Sunday, 18 December 2022

Java program to illustrate and defining implements extending implements class.



public class avi implements Runnable
{
       public static void main(String[] args) {
        Thread guruThread1 = new Thread("avi");
        Thread guruThread2 = new Thread("avi");
        guruThread1.start();
        guruThread2.start();
        System.out.println("Thread names are following:");
        System.out.println(guruThread1.getName());
        System.out.println(guruThread2.getName());
    }
    @Override
    public void run() {
    }
}



      output : avi 

a        avi 













No comments:

Post a Comment

GitHub Most Imp Command For Every Developer Learn:

 Top Command for GitHub:  1) git clone 2) git init and git status   3) git add file name  or git add .  4) git commit -m message  5) git rem...