adplus-dvertising
frame-decoration

Question

Is it possible that an object of is passed to a function, and the function also have an object of same name?

a.

No, Duplicate declaration is not allowed

b.

No, 2 objects will be created

c.

Yes, Scopes are different

d.

Yes, life span is different

Answer: (a).No, Duplicate declaration is not allowed

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Is it possible that an object of is passed to a function, and the function also have an object of same name?

Similar Questions

Discover Related MCQs

Q. Passing an object using copy constructor and pass by value are same.

Q. What is reference to an object?

Q. Whenever an object is assigned to a variable or passed to a method, ________________

Q. Does use of object reference in assignment or passing means copy of the object is being used?

Q. Is there any explicit use of pointers in java that would be applicable to objects?

Q. Can a super class object give reference to a subclass method?

Q. If a reference variable is declared final then, _________________

Q. Which of the members are referred by this pointer usually (Java)?

Q. How to refer to method of nested class?

Q. How many objects can be referenced from same variables?

Q. Java handles memory dynamically and references are deleted as soon as they are out of scope.

Q. Invoking a method on a particular object is ____________ sending a message to that object.

Q. Can reference to an object be returned from a method?

Q. What does memory allocation for objects mean?

Q. Where is the memory allocated for the objects?

Q. When is the memory allocated for an object?

Q. Using new is type safe as _______________________

Q. Which of the following function can be used for dynamic memory allocation of objects?

Q. Which keyword among the following can be used to declare an array of objects in java?

Q. When is the memory allocated for an object gets free?