If I have class structure like that
public class Foo{
//declaring fields and methods
Foo(int k){
Bar.a = k;
}
public class Bar{
public final static int a;
}
}
And if i create many instances of Foo, how does static field in class Bar acts? I mean, it is the same instance for all Foo objects or for each instance there is different static field?
I think that Inner class cannot have static members as it requires an instance of Outer Class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With