Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multiple Inheritance in java

882191Oct 5 2011 — edited Oct 5 2011
Hello,

Many says java does not support multiple inheritance, is it ture? if yes, could please explain the below code
/* 
*we all know every class extends Object class.
* So the base class is extending Object class
*/


public class Base
{
  void  baseMethod1()
  {
     Sytem.out.println("In Base method 1 ");
  }

}

/*
* Here Derived class is extending Base as well as Object class.
* And concluding java supports multiple inheritance
*/
public class Derived extends Base
{
 void derivedMethod1()
 {
     System.out.println("In Derived method 1");
 }
}
Please guide me if i am concluding wrong.
This post has been answered by 836548 on Oct 5 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2011
Added on Oct 5 2011
2 comments
273 views