Can we inherit the constructor in a Class?please give one
example.
Answer Posted / amit
class demo
{
demo()
{
System.out.println("i am default constructor ");
}
}
class demo1 extends demo
{
demo1()
{
System.out.println("i am default constructor ");
}
}
class test
{
public static void main(String st[])
{
demo1 ob=new demo1();
}
}
but it is inherited constructor ....so be can say inherited constructor or/not ?????????
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which variables are stored in stack?
What methods are used in Servlet?Applet communication?
What is difference between equal and == in java?
Explain oops concepts in detail?
Why enumeration is faster than iterator?
What is a condition in programming?
What is jdbc api?
Are generics important java?
How many times finalize method will be invoked? Who invokes finalize() method in java?
What are the java ide’s?
What does %4d mean in java?
What are the advantages of passing this into a method instead of the current class object itself?
Explain an algorithm to find depth of a binary tree.
What's the default access specifier for variables and methods of a class?
List out five keywords related to exception handling ?