This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Reference Assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reference Assignment" Watch "Reference Assignment" New topic

Reference Assignment

prakash praksh

Joined: Oct 22, 2009
Posts: 2
Please let me know what happens when at line no 1 and line no2. ?

John de Michele

Joined: Mar 09, 2009
Posts: 600

Have you tried it? What do you think will happen?

Nicolas Kal
Ranch Hand

Joined: Sep 09, 2009
Posts: 69

At line 1 (9 in the snipset) object 'o' references to the same object reference of p
At line2 (11 in the snipset) object 'o' references to the array reference of variable a in line 10


SCJP 6.0 , SBCD (Preparing..),
MSc Enterprise Systems Development, BSc Computer Science
GeeCON Prague 2014
subject: Reference Assignment