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

What is string pool?

0 Answers  


Is main a keyword in java?

0 Answers  


What are types of Java applications?

14 Answers  


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

0 Answers  


What is singleton class example?

0 Answers  


What is the purpose of using the java bean?

0 Answers  


how to java plateform independent?

5 Answers   TCS,


What isan abstract class and when do you use it?

1 Answers   Genpact,


Interface A { String test(); } Interface B { int test(); } Create a class AB which must implements both A & B interfaces.

17 Answers   Hewitt,


What are the differences between heap and stack memory?

0 Answers  


What is jvm? How its run?

0 Answers  


What happens if an exception is throws from an object's destructor?

0 Answers   Amazon,


Categories