wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes argument -defined Anonymous inner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "argument -defined Anonymous inner class " Watch "argument -defined Anonymous inner class " New topic

argument -defined Anonymous inner class

K Anshul
Ranch Hand

Joined: May 19, 2004
Posts: 71

iMethod is overridden in an argument. Is there any way i can call iMethod() and print "Argument" on the screen.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
if IFace defines the method you can call it.
If not, tough luck.

Sanyev Babu
Ranch Hand

Joined: Dec 18, 2003
Posts: 132

Since it is a argument local inner class you can call the overloaded iMethod only from inside the method. The code above will print Argument. but it is called from within the method.

I agree. Here's the link: http://aspose.com/file-tools
subject: argument -defined Anonymous inner class
Similar Threads
Argument-Defined Anonymous Inner Class
Confusion on code
Argument defined Annonymous Inner class
Why it is illegal to use abstract and static modifiers together in method declaration ?
static block and empty block inside any class.