Today: April 18, 2024 11:56 pm
A collection of Software and Cloud patterns with a focus on the Enterprise

Tag: extend


Most Java programmers are very familiar with the mechanism to extend a class. To do this, you simply create a new class and specify that it extends another class. You can then add funtionality not available in the original class, AND you can also override any functionality that existed already. Imagine a simple class public class Message { private String message;   public Message(String message) { this.message = message; }   public void showMessage() { System.out.println(message); } }public class Message { private String message; public Message(String message) { this.message = message; } public......

Continue Reading