This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
hi all, is there any limitation in layer of innerclass we could make inside a class? thanks.
posted 12 years ago
Not really. It's possible there's some fundamental limitation based on memory limitations or class file formats, similar to the way a String can never have more than Integer.MAX_VALUE chars in it. But practically speaking, you can nest as deep as you want. The limiting factor will probably be that someone may shoot you for writing unreadable code if your nesting gets too deep.