Java General

Interface extend Interface Java

We know basically Java does not support multiple inheritance. But supports partially through interfaces. Interfaces were introduced just to support multiple inheritance. This tutorial explains inheritance styles with interfaces, inheritance between interfaces and Interface extend Interface. One principle in inheritance is after extends there must come only one either concrete class or abstract class. But …

Interface extend Interface Java Read More »

Java Timer Task

JDK 1.3 gives two classes java.util.Timer and java.util.TimerTask and are generally used in combination with threads to generate events at regular intervals. Following is the link from this same Web site illustrating Timer and TimerTask with example Timer and TimerTask Would you like to know the Observer and Observable? classes Observer and Observable

Thread Methods Java

General thread methods in Java, the Programmer mostly uses are sleep(), getName(), setName(), setPriority(), join() etc. Thread class comes with more methods like isAlive(), activeCount(), setDaemon() etc. These methods are discussed herewith. public class ThreadMethods { public static void main(String args[]) { // THREAD NAME METHODS Thread newThread = new Thread(); System.out.println(“newThread default name: ” …

Thread Methods Java Read More »