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
If a class is declared without any access modifiers, where can the class be accessed?
What is a short in java?
What is singleton class and how can we make a class singleton?
Why collection doesn’t extend cloneable and serializable interfaces?
How many bits is a string in java?
What is the main functionality of the remote reference layer?
Is null a value?
What is string [] java?
Why do we create public static method in java?
What is the purpose of the main method?
What is ++ a in java?
What is the use of bufferedreader?
What is arraylist e?
Explain, java is compatible with all servers but not all browsers?
What are the differences between Java 1.0 and Java 2.0?