View RSS Feed

Recent Blogs Posts

  1. Class Methods

    by , 04-26-2012 at 06:38 PM
    If class method is defined by the subclass with similar sign as that of class method which is present in superclass, then in subclass the method present will be hiding the one which is present in superclass.
    Distinction b/w overriding and hiding possess certain important implication. Overridden methodís version which is invoked is that one which is present in subclass. Hidden methodís version which is invoked is totally dependent upon whether it gets invoked by the subclass or superclass. ...
    Categories
    Inheritence
  2. Class Methods

    by , 04-26-2012 at 05:51 PM
    Static variables as well as static methods are supported by the Java programming language. Static methods which consists of the static modifiers shall be invoked along with the class name with no need to create the class instance, as in
    Java Code:
    ClassName.methodName(args)
    One of the most common use, for the static method, is the static file access. For instance, static method would be added to the Bicycle class for accessing static field of numberOfBicycles.
    Java Code:
    public
    ...
    Categories
    Tutorial