OOP Interfaces Demo in Java - Part 3

OOP Interfaces Demo in Java - Part 3

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.

package InterfaceDemo;
/**
 *
 * @author nicomp
 * This class models a NetBeans project.
 * It implements the InterfaceDemo interface.
 */
public class NetBeansProject extends BaseClass implements InterfaceDemo {

        public boolean Build() {
            boolean status = false;
//          We don't know how to build a NetBeans project, yet.
//          However, we can still implement the interface to a limited extent.

//          The code that is specific to building a NetBeans project would go here.
            System.out.println("\nHello from NetBeansProject.Build()");

            return status;
        }
}

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