Friday, April 12, 2019

thread using thread class

code:

public class cl extends Thread{ public void run(){ System.out.println("thread is running.............."); } public static void main(String args[]){ cl ob=new cl(); ob.start(); } }


output:
$javac cl.java
$java -Xmx128M -Xms16M cl
thread is running..............

No comments:

Post a Comment