In this code
class Foo {
public int a = 3;
}
class Bar extends Foo {
public int a = 8;
}
public class HelloWorld {
public static void main(String[] args) {
Foo f = new Bar();
Bar f = new Bar();
}
}
What is the difference between
Foo f = new Bar();
and
Bar f = new Bar();
Thank You