This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Abstract method local inner classes help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract method local inner classes help" Watch "Abstract method local inner classes help" New topic
Author

Abstract method local inner classes help

Terry Rickson
Greenhorn

Joined: May 05, 2005
Posts: 22
Hi,

Take a look at this code.



I know the code won't compile because the method local inner class has been marked abstract but how would i be able to the inner class. Please somebody help!

Thanks in advance
Terry Rickson
Greenhorn

Joined: May 05, 2005
Posts: 22
the above question was mean't to say how would i be able to use the inner class?

code example would be great
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
Hi Terry

If you want to create object for Inner class, it should be created only within that outermethod()(iff it should not be abstract)
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
Here ur wishes

Terry Rickson
Greenhorn

Joined: May 05, 2005
Posts: 22
Thanks Vidya,

I knew that anyway but was'nt sure why method local inner classes could be marked abstract.

Thanks again!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Abstract method local inner classes help
 
Similar Threads
where final variable reside ?
Method local inner classes
Method-local inner class and final local variable
Doubt in Method Local inner classes
Doubts regarding Method local inner class