File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

anonymous classes

 
shashank hiwarkar1
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Anonymous Inner classes cannot implement an interface and extend a non-final class at the same time.

can anyone explain me why?
(From Abhilash Exam)
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because the syntax doesn't support it.
If you make an anonymous class you say
new InterfaceName(){ . . .};
or
new ClassName(){. . .};
in order to do BOTH you have to stuff 2 names in the new statement.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic