Why the field can't be overridden..........?
public class Main
{
public static void main(String[] args) {
B b=new B();
System.out.println(b.s);
A a=new B();
System.out.println(a.s);
}
}
class A{
String s="super"...
See more
Download the Study24x7 App, so you can connect and collaborate.