In howmany ways a thread can be created?

Answer Posted / rajshekhar

There are 2 ways to create a thread
1.By extending thread class
2.and the second one is by implementing runnable
interface.among the two the second one is more common and
better to use.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which component handles cluster communication in jboss?

825


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

763


what are RemoteObjects?

2452


What are the design considerations while making a choice between using interface and abstract class?

744


what is a non-repeatable read?

2021






How are the elements of a cardlayout organized?

763


Explain RMI Architecture?

805


What is the difference between the session.update() method and the session.lock() method?

731


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

735


Is it possible to stop the execution of a method before completion in a sessionbean?

807


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

747


Why is string immutable in java?

795


What happens when a thread cannot acquire a lock on an object?

735


What are the benefits of detached objects?

783


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2492