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 Instantiating an inner class. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Instantiating an inner class." Watch "Instantiating an inner class." New topic
Author

Instantiating an inner class.

Alexander Sales
Ranch Hand

Joined: Feb 21, 2011
Posts: 89

Hi,

Good morning and good day!

Question:

Suppose I have..



How many object instances will i create if i will do this code?



OCPJP 6, OCEWCD Java EE 6
Ralph Cook
Ranch Hand

Joined: May 29, 2005
Posts: 479
You will have created two that we know of -- one Outer and one Inner, with no ongoing reference to the Outer class.
rc
 
Consider Paul's rocket mass heater.
 
subject: Instantiating an inner class.