Can we inherit the constructor in a Class?please give one
example.
Answer Posted / brijendra kumar(java xavient)
We connot inherit the constructor in class beause the
construtor name is same as the class name.
class Brijendra
{
int x,y;
Brijendra(int a , int b) //constructor of class
{
a=x;
b=y;
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is it possible to use string in the switch case?
What is rule of accessibility in java?
Why do we need autoboxing in java?
What is a super method?
What is static synchronization?
What is module in project?
Is it necessary for the port addresses to be unique? Explain with reason.
What is difference between final and finally in java?
how to create multithreaded program? Explain different ways of using thread? : Java thread
Can a class be declared as protected?
What is an empty class? What functionality does it offer in Java?
What is the map interface in java programming?
Can we sort arraylist in java?
How does remove work in java?
How to connect to a remote database using Applet?