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
Difference between abstract and concrete class ?
Can I learn java without any programming experience?
do I need to use synchronized on setvalue(int)? : Java thread
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
What is difference between add() and addelement() in vector?
FOR EXAMPLE WE R HAVING TWO LIST ELEMENTS ..BOTH LISTS CONTAINS ID,NAME,PLACE ..I NEED TO COMPARE BOTH IDS IN TWO LISTS,IF ID'S R SAME MEANS WE HAVE ADD THE DETAILS(LIKE NAME,PLACE) TO MAP...HOW IS POSSIBLE ?CAN ANY ONE SUGGEST?
What is the protected method modifier?
Which of the following is not an isolation level in the JDBC
What are the disadvantages of using inner classes?
What does snprintf return?
Why is a singleton bad?
Is linkedlist thread safe in java?
What do you mean by chromounits in java8?
What happens if we override only equals?
What is main function purpose?