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

Does Java support multiple Inheritance?

Answer Posted / divyesh chauhan

yes java do not support multiple inheritance but we can achieve multiple inheritance using concept of interface implementation in class
for e:g
interface my
{
public void show();
}
interface my1 extends my
{
void disp();
}
class child implements my1
{
public void show()
{
System.out.println("hello java");
}
public void disp()
{
System.out.println("hello disp");
}
public static void main(String...a)
{
my m1=new child();
m1.disp();
m1.show();
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is tcp and udp?

950


What is off heap memory?

933


Can string be considered as a keyword?

986


What is a method in coding?

991


What are the drawbacks of singleton class?

949


Can we declare a constructor as final?

1203


Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

1847


What is the importance of hashcode() and equals() methods?

998


Explain the difference between transient and volatile in java?

951


Can we have multiple public classes in a java source file?

1094


Does unicode support all languages?

959


What is the use of beaninfo?

980


What’s meant by anonymous class?

1018


What is java basic concept?

971


Can we have more than one package statement in source file ?

958