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
Explain the difference between an Interface and an Abstract class?
What is the basic difference between string and stringbuffer object?
Is java code slower than native code?
Difference between string, stringbuffer and stringbuilder?
Can we define a package statement after the import statement in java?
What is boolean used for?
Why java is secure? Explain.
Are primitives objects?
Explain about interthread communication and how it takes place in java?
What is the difference between normal report & matrix report?
What is the use of pattern in java?
What are the basic interfaces of java collections framework?
What is the difference between procedural and object-oriented programs?
What is diamond operator in java?
what is the messsage u r going to get from an objectoriented programing?