In howmany ways a thread can be created?

Answer Posted / harish

There are two different ways to create a Thread. One is
extends Thread class and implement Runnable Interface.
Better to go for Runnable interface. It will have a method
run(). You should override in the sub class. Even, you
can extend another class to the same thread class.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is a java object message delivered to a non-java client?

761


What do you mean by Socket Programming?

756


What must a class do to implement an interface?

751


Why is string immutable in java?

795


What are the difference between RMI and CORBA?

813






Can I run seam with jdk 1.4 and earlier?

728


Describe activation process?

2260


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

1954


What is the immediate superclass of the applet class?

814


When is the best time to validate input?

795


What are the different approaches to represent an inheritance hierarchy?

791


how i secure my site with the https protocol.what are the steps?

1944


Explain about thread synchronization inside a monitor?

2221


Do I have to use jsps with my application?

744


Explain the different types of memory used by jvm?

841