File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Extending inner class problem. 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 "Extending inner class problem." Watch "Extending inner class problem." New topic

Extending inner class problem.

ramya ray
Ranch Hand

Joined: Aug 11, 2006
Posts: 101
Hi ,

Kindly describe whats wrong with the below code is it correct way t extend an inner class as in below code:

class so{ //outer class
class s{ // inner class

class c extends so.s{ //extending inner class
int i =10;

public static void main(String args[]){
c c1 = new c();

while compiling it is giving error: an enclosing instance that contains so.s is required c(){
Please explain whats wrong in it

Thanks for all your support
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
How to inherit from an inner class?
I agree. Here's the link:
subject: Extending inner class problem.
jQuery in Action, 3rd edition