Answer Posted / amit kumar gupta
yes we can call by super() or this();
public abstract class Class1{
public Class1(){
System.out.println("Class1");
}
}
public class Class2 extends Class1{
public Class2(String Name){
System.out.println("Name = " + Name);
}
public Class2(){
this("AMIT"); // use only one this or super
super();
}
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
How do you sort arraylist in descending order?
What is a flag variable?
What is binary search in java?
What is OOP's Terms with explanation?
What is the use of arraylist in java?
Should a main method be compulsorily declared in all java classes?
What is difference between float and double?
What about static nested classes in java?
What is the difference between and ?
What is a method in programming?
Can we use synchronized block for primitives?
Can java cast null?
What is a Transient Object?
Why is stringbuffer thread safe?
What is static synchronization?