jQuery in Action, 2nd edition*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K&B Doubt Inner Classes 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 "K&B Doubt Inner Classes" Watch "K&B Doubt Inner Classes" New topic

K&B Doubt Inner Classes

Sasha Ruehmkorf
Ranch Hand

Joined: Mar 29, 2007
Posts: 115
page 668
An anonymous inner class can extend exactly one class or implement exactly one interface

From JLS:
A class necessarily implements all the interfaces that its direct superclasses and direct superinterfaces do.

[ May 30, 2007: Message edited by: Sasha Ruehmkorf ]
John Stone
Ranch Hand

Joined: May 04, 2007
Posts: 332

this is meant as: extends or implements _directly_ only one class or interface
Sasha Ruehmkorf
Ranch Hand

Joined: Mar 29, 2007
Posts: 115
Yep, I think so. But as it is the answer to a question in the selftest, where "can implement multiple interfaces" was considered wrong, I thought I should report it.
I agree. Here's the link: http://aspose.com/file-tools
subject: K&B Doubt Inner Classes
Similar Threads
anonymous inner class problem
Inner class/anonymous
Synchronized Class
inner class extends enclosing class
why can't we have a public class and a non-public class(which has the main method) in the same file