hello all,
again, i stomped agains this question in a mock exam
public class Test20 extends A{
Test20(){
this("Hi");
}
Test20(
String str){
System.out.println(str);
}
public static void main(String args[]) {
Test20 t = new Test20();
}
}
class A{
A(){
System.out.println("Super");
}
}
What will be the output?
A1 Super Hi
A2 Hi Super
A3 Super
A4 Compiler Error
result was A1, but i thought that super() and this() cannot be called at the same time....... it's either or as far as i understood.....
or is it only regarding explicit super() and explicit this() calls?
anyone could clarify?
thanks and regaqrds
marco