aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes inner classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "inner classes" Watch "inner classes" New topic
Author

inner classes

george tharakan
Greenhorn

Joined: Jan 12, 2001
Posts: 7
can a static innerclass can extend another class
class outer{
static class inner extend Frame{
inner()
{
super("my window");
setSize(300,300);
setVisible(true);
}
}
}
class test{
public static void main(String args[])
{
outer.inner i=new outer.inner();
}
}

kindly please explain the result.
------------------
Kalpesh Soni
Ranch Hand

Joined: Jan 02, 2001
Posts: 312
the program is running fine


------------------
KS


Test 094, IBM WID 6.0 cert
SCJP 1.2
SCBCD 1.3 Beta
SCWCD 1.4 Beta
SCMAD Beta
SCDJWS Beta

KS
vadiraj vd
Ranch Hand

Joined: Dec 15, 2000
Posts: 68
Hi George,
static class is similar to any other non-static class except that
it has the access to only static members of the enclosing class.
So I think there's no harm by extending a class.

------------------
Regards
---------
vadiraj

*****************
There's a lot of I in J.
*****************


Regards<BR>---------<BR>vadiraj<P><BR>*****************<BR>There's a lot of I in J.<BR>*****************
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inner classes