aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Anonymous class-please reply. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Anonymous class-please reply." Watch "Anonymous class-please reply." New topic
Author

Anonymous class-please reply.

hema janani
Ranch Hand

Joined: May 19, 2000
Posts: 70
please help.
*******1.what is the valid innerclass?
a.new complex Interface(x){}
what RHE has to say about this is "if an anonymous class extends existing class,rather than implementing an interface,then argument for the superclass constructor may be placed in the argument part.
but
"if an Anonymous classes that implements interface ,it is imposssible to use any arguments in the new part for these classes.
so I feel that the option a is not a valid one.
2.does Interrupted exception stops the thread from executing.please reply in yes & no?no nonending explanations please.
I have already read the previous thread ,but it becomes all the more confusing.
Ying Xing
Greenhorn

Joined: Sep 23, 2000
Posts: 24
Hi hema janani,
For your question 1, just as you have mentioned "if an anonymous class extends existing class,rather than implementing an interface,then argument for the superclass constructor may be placed in the argument part." Here, the complexInterface refers an EXISTING CLASS, so the construction of the anonymous class "new complex Interface(x){}" is valid.
For your question 2, Interrupted exception can NOT stop the thread from executing.

regards
yingxing
hema janani
Ranch Hand

Joined: May 19, 2000
Posts: 70
thank you xing ying
oops ying xing
 
wood burning stoves
 
subject: Anonymous class-please reply.