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


Please Help Members By Posting Answers For Below Questions

How to optimize the javac output?

809


What are different types of references?

756


How do you delete a list in java?

737


What are recursive functions?

805


What is static method with example?

877


How many bytes is 255 characters?

753


Why null value is used in string?

772


Difference between this() and super() in java ?

820


Can we call virtual funciton in a constructor ?

1955


Can we override the overloaded method?

804


What is abstract class? Explain

788


Explain importance of throws keyword in java?

774


What are the Class Libraries ?

802


Why is boolean important?

803


Can we convert integer to string in java?

830