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
Explain about instanceof operator in java?
How do you replace all in word?
Explain the difference between arraylist and linkedlist in java?
What is double checked locking in singleton?
How do you reverse a string in java?
How to declare an arraylist in java?
Why java is object oriented?
What are the java ide’s?
Difference between predicate, supplier and consumer ?
Write an algorithm for quick sort?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?
Can you extend main method in java?
What are the main concepts of oops in java?
How do I remove a character from a string in java?
What is 16 bits called?