If i define
class A {
public int a;
public float b;
public A() {
a = 10;
}
}
class B extends A {
public B() {
a = 2;
}
}
class C extends A {
public C() {
b = 2.0f;
}
}
And in main
public static void main(//...) {
A a = new A();
B b = new B();
C c = new C();
a = b; //error?
b = c; //this one too?
}