What will be the output when you compile and execute the following program.
////////////////////////////////////////////
class Base
{
void
test() {
System.out.println("Base.test()");
}
}
////////////////////////////////////////////
public class Child extends Base {
Child(int i) { test (); }
Child(float f) { this ((int)f); }
void test() {
System.out.println("Child.test()");
}
static public void main(
String[] a) {
new Child(10.8f).test();
}
}
Select most appropriate answer.
a) Child.test() //true
Child.test()
b) Compilation Error: No default constructor ( constructor matching Base())
found in class Base.
c) Runtime Error: No default constructor ( constructor matching Base())
found in class Base.
d) Compilation Error: Cannot call this() from a constructor.
I don't know how we get this output. help me here???