java program for threads by extending thread class on January 23, 2022 Get link Facebook X Pinterest Email Other Apps class A extends Thread{ public void run() { System.out.println("Hello"); }}class Demo{ public static void main(String ar[]) { System.out.println("One"); A ob = new A(); ob.start(); System.out.println("Two"); }}OUTPUT Comments
Comments
Post a Comment