0
4.7kviews
Explain how threads are created in Java.

Mumbai University > Information Technology > Sem 3 > Object Oriented Programming Methodology

Marks: 5 M

Year: May 2015

1 Answer
0
25views

THREAD CREATION

There are two ways to create thread in java;

  • Implement the Runnable interface (java.lang.Runnable)
  • By Extending the Thread class (java.lang.Thread)

IMPLEMENTING THE RUNNABLE INTERFACE

The Runnable Interface Signature

public interface Runnable {

    void run();
}

One way to create a thread in java is to implement the Runnable …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.