| | |
maximum depth for inner classes?
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
there shouldn't be... if each class allowed x inner classes you've still got a potential of infinity levels deep.
it might make your addressing a bit long winded though o_O
weird question!
when classes with inner classes or anonymous classes are compiled they tend to occupy a single addressing level with a hash between the "parent" class and the "child" class. so an object of an inner classtype will be of type:
Package/ParentClass#InnerClass rather than type Package/ParentClass/InnerClass
in theory it should be possible to continue that naming convention indefinately, but in practice, the VM or compiler might not be expecting it.. try it out, let me know =P
it might make your addressing a bit long winded though o_O
weird question!
when classes with inner classes or anonymous classes are compiled they tend to occupy a single addressing level with a hash between the "parent" class and the "child" class. so an object of an inner classtype will be of type:
Package/ParentClass#InnerClass rather than type Package/ParentClass/InnerClass
in theory it should be possible to continue that naming convention indefinately, but in practice, the VM or compiler might not be expecting it.. try it out, let me know =P
Plato forgot the nullahedron..
I think you'll at some point run into limits for the maximum length of classnames (including package names) which are likely Integer.MAX_VALUE.
Before that you'll possibly run into the maximum size of codefiles (though those can be quite large).
The most serious problem of all of course is that it's horrendously bad design to need anything like that
Before that you'll possibly run into the maximum size of codefiles (though those can be quite large).
The most serious problem of all of course is that it's horrendously bad design to need anything like that
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
Other Threads in the Java Forum
- Previous Thread: javabeans and jsp
- Next Thread: Date type problem JSP, mySQL
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api append apple applet application arguments array arrays automation bi binary bluetooth businessintelligence busy_handler(null) chat class classes client code component database draw eclipse encryption equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop main map method methods mobile netbeans newbie number open-source oracle oriented panel print problem program programming project qt recursion reference replaysolutions repositories return robot scanner screen scrollbar se server set singleton size sms socket sort sql string swing test threads time tree utility windows xor






