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
How to optimize the javac output?
What are different types of references?
How do you delete a list in java?
What are recursive functions?
What is static method with example?
How many bytes is 255 characters?
Why null value is used in string?
Difference between this() and super() in java ?
Can we call virtual funciton in a constructor ?
Can we override the overloaded method?
What is abstract class? Explain
Explain importance of throws keyword in java?
What are the Class Libraries ?
Why is boolean important?
Can we convert integer to string in java?