aspose file tools*
The moose likes Java in General and the fly likes non anonymous inner class either static or not access from descendent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "non anonymous inner class either static or not access from descendent" Watch "non anonymous inner class either static or not access from descendent" New topic
Author

non anonymous inner class either static or not access from descendent

Gasan Guseynov
Ranch Hand

Joined: Jan 03, 2006
Posts: 67
why all between /********************************** is prohibted?? java version 1.6

package my.test;

public class AClass {
static class InnerDefaultStaticClass {}
protected static class InnerProtectedStaticClass {}

class InnerDefaultClass {}
protected class InnerProtectedClass {}
}

package my.test2;

public class DClass extends AClass{
private DClass cl = new DClass();

//****************************************************

DClass.InnerDefaultStaticClass class2 = new DClass.InnerDefaultStaticClass();
DClass.InnerProtectedStaticClass class3 = new DClass.InnerProtectedStaticClass();
DClass.InnerDefaultClass class5 = cl.new InnerDefaultClass();
DClass.InnerProtectedClass class6 = cl.new InnerProtectedClass();

//****************************************************

}
[ June 29, 2008: Message edited by: Gasan Gouseinov ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: non anonymous inner class either static or not access from descendent
 
Similar Threads
Abstract class??
Null Pointer Exception ???
what linking mechanism uses java (early or late)
class' vs constructor's accessability
Modifier protected does not hide inherited members to (static) code of superclass package