Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
Beginning Java
Instantiating an inner class.
Alexander Sales
Ranch Hand
Posts: 89
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
Good morning and good day!
Question:
Suppose I have..
public class Outer { private class Inner { } }
How many object instances will i create if i will do this code?
Outer.Inner inner = new Outer().new Inner();
OCPJP 6, OCEWCD Java EE 6
Ralph Cook
Ranch Hand
Posts: 479
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You will have created two that we know of -- one Outer and one Inner, with no ongoing reference to the Outer class.
rc
Attractive, successful people love this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
a question about instantiating an inner class
Inner Class
confused question
Inner Class - Initialization Sequence
Inner Class
More...