wood burning stoves
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

Win a copy of Head First Android this week in the Android forum!
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.
It is sorta covered in the JavaRanch Style Guide.
subject: K&B Doubt Inner Classes
It's not a secret anymore!