In howmany ways a thread can be created?

Answer Posted / ranganathkini

1. Extending the Thread class
2. Implementing Runnable interface in a class and then
passing its reference to a new Thread.
3. Creating an anonymous class to extend the Thread class.
4. Creating an anonymous class to implement the Runnable
interface and then passing its reference to a new Thread.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is mdb and what is the special feature of that?

568


What is the difference between long.class and long.type?

571


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

552


What must a class do to implement an interface?

586


Is the session factory thread safe?

679






which type of objects reference will be given to client?

2034


Explain phantom read?

1741


Are enterprise beans allowed to use thread.sleep()?

652


hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me

1785


Is there a guarantee of uniqueness for entity beans?

572


Will the general public have access to the infobus apis?

532


Can you control when passivation occurs?

598


Name three subclasses of the component class?

619


What are the steps to write p-to-p model application?

1963


Explain the steps in details to load the server object dynamically?

4545