Saturday 26 December 2015

What is Single Inheritance in java with it's example



In this we can have single base class and n number if drive class.



For Example

class a
 {
    int a;
  void display()
   {
      System.out.println("Display method");
    }
 class b extends a
  {
  }
}

No comments:

Post a Comment