View RSS Feed

Java Basic

Basic Java programming tutorials for learning Java fundamentals.

  1. Abstract class vs Interface

    by , 01-08-2012 at 12:15 PM
    Base classes are used to present interface to its child classes in design. It supports that base class cannot be instantiated. It can be only up casted and its interface is used only. To achieve this, mark the base class as abstract. Compiler gives an error, if you try to create an object of abstract class.

    The interface helps and improves the concept of abstract class. In interfaces, you can only declare methods and cannot provide implementation. The child class which is implementing ...