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
What is the difference between a switch statement and an if statement?
What are the 6 mandatory procedures for iso 9001?
Explain the difference between extends thread vs implements runnable in java?
How many bits are in a sentence?
What is string [] args?
What is math floor in java?
What is the purpose of object oriented programming?
Can inner class have constructor?
Is singleton a bad practice?
What is difference between wait and notify in java?
What is the importance of main method in Java?
What is class array in java?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
Why we used break and continue statement in java?
What classes of exceptions may be thrown by a throw statement?