my dog learned polymorphism*
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Instantiating an inner class.
 
Similar Threads
Inner Class - Initialization Sequence
confused question
a question about instantiating an inner class
Inner Class
Inner Class