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...


write a simple program inheritance?

Answers were Sorted based on User's Feedback



write a simple program inheritance?..

Answer / prashant khot

class A
{

}
class B extends A
{
public static void main(String args[])
{
B b = new B();

}
}
In the above example, B is the class extending the A class.
Means that B is inherited from A.

Is This Answer Correct ?    26 Yes 2 No

write a simple program inheritance?..

Answer / dhawal

class A
{
int a=10;
}
class B extend A
{
public static void main(String[] a)
{
B objB;
objB=new A();
System.out.println("Value of a is"+objB.a);
}
}

Is This Answer Correct ?    2 Yes 13 No

Post New Answer

More Core Java Interview Questions

How do you square a number in java?

0 Answers  


What is ph and buffers?

0 Answers  


What is java and why do we need it? Explain

0 Answers  


Explain notify() method of object class ?

0 Answers  


What is protected and friendly?

1 Answers  


What is enhanced loop in java?

0 Answers  


What is final access modifier in java?

0 Answers  


Can java object be locked down for exclusive use by a given thread?

0 Answers  


What is the use of arraylist in java?

0 Answers  


What is string length in java?

0 Answers  


what is the Use of throws exception?

2 Answers  


What data structures are used to perform recursion?

0 Answers   Akamai Technologies,


Categories