OOP Interfaces Demo in Java - Part 4

OOP Interfaces Demo in Java - Part 4

The concept of an Interface in Java is designed to replace the functionality of multiple inheritance. C++, another object oriented programming language, supports multiple inheritance, Java does not. While Interfaces are very common in Java programming, some programmers avoid them. This example of OOP Interfaces Demo in Java provides an introduction to creating, implementing, and applying interfaces in the Java programming language. We illustrate OOP concepts with functional java source code and accompanying documentation.

Part 4

package InterfaceDemo;

/**
 * An abstract class; it has no properties or methods.
 *
 * Since it's abstract, this class cannot be instantiated.
 *
 * It doesn't even provide code for the interface.
 * Any class that inherits from this class must provide the code for the interface.s
 * @author nicomp
 *
 */
public abstract class BaseClass implements InterfaceDemo {
//  This is a pure abstract class.
//  Nothing here.
}

More by this Author


Comments

No comments yet.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working