• Abstract Class in java Program

    Abstract class and methods is many time uses in java programs when we want to create indexing of our methods in some secure class. Why Abstract class is secure? – We can’t create an object of Abstract Class, so we have to inheritance abstract with sub class. So, all access of abstract classes is managed […]

  • Remove Override Solution – 4: Dynamic Method Dispatch

    Dynamic method dispatch is 4th solution of remove override methods from java programs. In this blog we will see how to stop override method using dynamic method dispatch.   Example on Dynamic Method Dispatch class A {                 void method()                 {                                 System.out.println(“Welcome in A”);                 } }              class B extends A {                 […]

  • Final keyword with Class and Variable

    In this blog, we will work on final keyword with class and variable. Final class can’t inheritance with other class and final variable can’t modify after assign value. Let’s see both example in one blog   Final keyword with Class final class A {                 // Create some method } class B extends A             // […]

  • Remove override Solution – 3: final method

    Final method is 3rd solution of stop override in java programs. If we use final method in our super class, so we can’t use same name method in any sub class. If we add same name method with same parameter in sub class then java program generate compile time error. Final Method Example  class A […]

  • Remove override Solution – 2: super keyword

    Super keyword is second solution of remove override from java programs. Using of super keyword we can call super class methods and access super class variables.     class A {                 void method()                 {                                 System.out.println(“Welcome in A Class”);                 } } class B extends A {                 void method()   // Override                 […]