package pak1;
import pak2.B;
public class A {
void doAThings() {
System.out.print("A ");
}
public static void main(String[] args) {
A a = new B();
a.doAThings();
}
}
and
package pak2;
import pak1.A;
public class B extends A {
public void doAThings() {
System.out.println("I'm B ;)");
}
}
What will happen when you try to compile both classes and run the main-method?
Login in to like
Login in to comment