Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can we inherit the constructor in a Class?please give one
example.

Answers were Sorted based on User's Feedback



Can we inherit the constructor in a Class?please give one example...

Answer / sri

we cannot inherit constructors.

Is This Answer Correct ?    35 Yes 5 No

Can we inherit the constructor in a Class?please give one example...

Answer / sanketh

we cannot inherit constructors.
because if we declare a constructor it must be a same name
as its class name, but two class must have same name

Is This Answer Correct ?    16 Yes 4 No

Can we inherit the constructor in a Class?please give one example...

Answer / rakesh

We Can Not Interit the constructor.
We Can't have same class name
And Constructor Hava the same name as class name

Is This Answer Correct ?    9 Yes 2 No

Can we inherit the constructor in a Class?please give one example...

Answer / r.jainrocks@gmail.com

we can't inherit constructors because constructors are not the members of a class.

as in case of blocks.

Is This Answer Correct ?    8 Yes 2 No

Can we inherit the constructor in a Class?please give one example...

Answer / arvind patil

we cannot inherit the constructor.
But using the keyword super we can give a call
to the base class constructor

Is This Answer Correct ?    6 Yes 2 No

Can we inherit the constructor in a Class?please give one example...

Answer / praseen

We can not inherit the constructor in a class. Becoz we can't
have same class name. The constructor hava the same name as
of the class name.

Is This Answer Correct ?    3 Yes 2 No

Can we inherit the constructor in a Class?please give one example...

Answer / 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

Can we inherit the constructor in a Class?please give one example...

Answer / harivirat reddy

Constructors are not inherited because extending class must
contain diffent name but constructors class name and
constructor name must be similer.but we can inherit the
constructors by using 'super' keyword.

Is This Answer Correct ?    3 Yes 3 No

Can we inherit the constructor in a Class?please give one example...

Answer / amit

class demo
{
demo()
{
System.out.println("i am default constructor ");
}
}
class demo1 extends demo
{
demo1()
{
System.out.println("i am default constructor ");
}
}
class test
{
public static void main(String st[])
{
demo1 ob=new demo1();
}
}




but it is inherited constructor ....so be can say inherited constructor or/not ?????????

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

which class is the wait() method defined in? : Java thread

0 Answers  


Explain the difference between string, stringbuffer and stringbuilder in java?

0 Answers  


Explain different ways of creating a thread?

0 Answers  


Can we overload the constructors?

0 Answers  


Is 0 true or false in java?

0 Answers  


What is the use of arraylist in java?

0 Answers  


What is a void method java?

0 Answers  


how to open and edit XML file in Weblogic???

0 Answers   Symphony,


Write a program to check string is palindrome without using loop?

0 Answers   Cyient,


why operator overloading is removed in java?

1 Answers  


What is the use of math abs in java?

0 Answers  


Can private class be extended java?

0 Answers  


Categories