• 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                 […]

  • Remove override Solution – 1

    In our last blog, we see the effect of override method, super class’s method become unused. So we have to remove override process from our program. For that we have many solution like create overloading, using super class, dynamic method dispatch and final method. In this blog we will work on override the method. Remove […]

  • Override methods in java program

    Override methods V/S Overloading methods Override methods is dynamic polymorphism. Overloading methods is static polymorphism. Name of methods and parameter of methods are same in override. Name of methods are same but parameter of methods are not same in overloading method.     “Override method possible only in inheritance class, because we can’t create same […]