Java Question
abstract class A {
public void templateMethod() {
operation1 ();
operation3 ();
}
abstract public void operation1 ();
public void operation3() {
System.out.print("A-op3");
Class B extends A {
public void operation1() {
System.out.print("B-op1");
1.What is the output of:
B b1 = new B();
b1.operation1();
2.What is the output of:A b1 = new B ();
a1.operation() ;
3.What is the output of :
A b1 = new B();
a1.templateMethod();
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here