I came across this questions on one of the online Java Tests. The options were 4,5,8 and any number of times.
I have only used one inner class, but have never tried
I tried on my own: The answer is any number of times. The following is my test class, I had no compilation errors.
public class Test {
public Test ()
{
}
public static void main (String args[])
{
new Test ();
}
class Test2
{
class Test3
{
class Test4
{
class Test5{
class Test6{
class Test7{
class Test8{
class Test9
{
}
}
}
}
}
}
}
}
}