This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Static Inner Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Static Inner Class" Watch "Static Inner Class" New topic

Static Inner Class

farrukh mahmud
Ranch Hand

Joined: Feb 13, 2001
Posts: 47
first have a look on the code

the Code Works Fine
now my question is that if we want to access Inner class then it should mandatory that we can use Interface no other way???
Correct me If i am Wrong

Farrukh Mahmud
[This message has been edited by Marilyn deQueiroz (edited November 23, 2001).]

Regards<BR>Farrukh Mahmud
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
You can access the inner object via its type in the following way:

Now make the declaration of StaticInner private and it's true that the only way to access an instance of StaticInner is via interface.
hope helps

SCJP2. Please Indent your code using UBB Code
It is sorta covered in the JavaRanch Style Guide.
subject: Static Inner Class
Similar Threads
head first java - mixed messages
confused question
Inner Class
Jane Griscti's tutorial
find the error please