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
What do you mean by multithreaded program?
Why generics are used in java?
Why java is not 100% object-oriented?
What is the use of a copy constructor?
What is a two-pass assembler?
What is getclass () getname () in java?
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
What is an off by one error in java?
Is minecraft java edition free?
What is a method in coding?
What is the difference between reader/writer and inputstream/output stream?
What is the purpose of declaring a variable as final?
Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?
a thread is runnable, how does that work? : Java thread
What is meant by 'Class access modifiers'?