Wednesday, 14 December 2016

Java Tutorial : Java Threads (Thread start twice)

Click here to watch in Youtube :

Click the below Image to Enlarge
Java Tutorial : Java Threads (Thread start twice)
class DisplayThread extends Thread

    public static void main(String args[])
        DisplayThread displayThread = new DisplayThread();


    public void run()
        System.out.println("Hello by = " + this.getName());

Hello by = Thread-0
Exception in thread "main" java.lang.IllegalThreadStateException
    at java.lang.Thread.start(
    at DisplayThread.main(

Click the below link to download the code:

Github Link:

Bitbucket Link:

See also:

  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • Kids Tutorial
  • No comments:

    Post a Comment

    Google+ Followers

    Google+ Badge