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 the difference between java class and bean?

789


What do you know about seam?

777


Is the infobus client side only?

853


Which are the different segments of memory?

818


What is prototype?

815


Explain about local interfaces.

794


What are the different types of exception?

786


What is the purpose of the finally clause of a try-catch-finally statement?

767


what are getters and setters in Java with examples?

1490


What value does readline() return when it has reached the end of a file?

833


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

786


How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!

2764


What is jboss?

766


What class is the top of the awt event hierarchy?

818


What is ioc concept & explain it?

822