Home TechnologyProgrammingJava Subscribe to RSS

What Is Overriding?

Answer Question

1 Answer - Sort by: Date | Rating

    We create abstract classes and interfaces.
    So that we can use their methods in some other class with some modifications.
    Like this
    class A
    { int a,b,c;

    public void accept()
    {
    c=a+b;
    }

    }
    class b extends A
    { int d;
    public void accept ()
    {
    c=a+b+d;
    }
    }
    0 0

    Batheniya 

    answered 19 hours ago

      More

         
         

        Ask a Question via Twitter

        Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

        Blurtit Store

        Get T-shirts, hoodies, caps and more at the Blurtit store

        Blurtit International