View RSS Feed

Java Object

Object-oriented programming in Java.

  1. Java method Overriding

    by , 04-26-2012 at 05:42 PM
    Example that has been given below shows the method overriding, in Java. In java, method overriding is a subclass method that overrides the super class method. Extend keywords are used by the subclass for extension of the super class. In the example, Class B is present in the subclass. Class A is present in super class. Overriding method of superclass & subclass has similar signatures. Methods of the superclass are being modified by using overriding.
    Java Code:
    class A {
    int i;