• Interface extends with interface

    In this blog, we will see one interface extends with another interface. Using of this structure, class needs to implements with only sub interface. Interface extends another interface   Interface1                               |           [ extends ] [ Implements ] Interface2 |           [ Implements ] [ extends ] Class       Inter1 in InterPack1 package package InterPack1; […]

  • Multiple inheritance is Possible in Java?

    Answer of above question is mention in below figure. Yes, Multiple inheritance possible in java using of interfaces. Interface1                               Interface2             |                                           |   [ Implements ] [Extends]             ——————————                                  |                             Class     Inter1 in InterPack1 Package package InterPack1; public interface Inter1   // Interfaces {                 public int x = […]

  • Simple interface with Package

    Interfaces |  [ Implements ] [ Extends ] Classes   Use of Interface in java programs Creating method indexing for easy understanding long programs Creating final keywords Multiple inheritance possible in java programs using interfaces   Rules of Interfaces Interfaces and indexing methods must be public Indexing methods must be override in implemented class   […]

  • Access Control in java programs

    This topic is access control in java programs with public, private, protected and non-modifier. This is biggest blogs and video. Limit of Access Control Modifier Modifier Access Limit Private Work only in own class Non-Modifier Work only in one package Protected Work in one package, work in different package if two class are inheritance Public Work […]

  • Packages with inheritance

    In this blog, we will see how to customize our inheritance example in different packages.   In this example, we will see three different packages pack1, package1 and package2. Package1 with A class Package2 with B Class Pack1 with example2 Class   package package1; public class A {             public void methodA()             {                         […]