aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes [to - Eric]..inner class 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 "[to - Eric]..inner class" Watch "[to - Eric]..inner class" New topic
Author

[to - Eric]..inner class

chao-long liao
Ranch Hand

Joined: Jul 29, 2001
Posts: 78
Inner classes are real classes, and can be manipulated the same as "top-level" classes,an inner class can implement an interface or extend a class.
//try this code
interface S{}
class Base {}
public class A{
public static void main(String argv[]){}
private class inner extends Base implements S{}
}
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370


Nice liao! The code shows that inner classes can also extend
interfaces like package-level classes...

------------------
azaman


Ashik Uzzaman
Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Eric Pramono
Ranch Hand

Joined: Jul 09, 2001
Posts: 74
Thanks Liao..
Really appreciate it..
Regarding my other thread... http://www.javaranch.com/ubb/Forum24/HTML/011363.html
I think that anonymous class is the one that cannot extends an explicit class and implements an interface at the same time..
am I right?
- eric
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

U should be right eric!
------------------
azaman
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [to - Eric]..inner class