Possible Duplicate:
Why cant we have static method in an inner class?
I don't know why an inner class cannot have a static method. Why is it wrong?
class A1
{
class B1
{
static void fun()
{
System.out.println("HIII");
}
}
public static void main(String[] args)
{
A1 a = new A1();
A1.B1 b = new a.B1();
b.fun();
}
}
If an outer class object can access a static method and a variable y
not a inner class get the access? What are the problems.