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
What is the original name of java?
Can a class be defined inside an interface?
What is an abstract method in java programming?
Why do we need hashset in java?
What is java in detail?
What are the basic control structures?
What is externalizable interface?
What do you understand by java virtual machine?
What is the program compilation process?
State some situations where exceptions may arise in java?
What is the private method modifier?
How do you use nextline in java?
How to make object serializable in java?
What is connection class in java?
What is meant by inheritance and what are its advantages?