How many ways can a thread be used?
Answer Posted / muruganantham
Two ways we can using in Thread. One is Thread class and
another one is Runnable interface. If we are using extends
Thread class means you must override the run() method. We
can create a thread object after that we used start method.
Its only one waiting (wait())thread can be executed
Ex:
Thread t=new Thread();
t.start();
If we are using implement Runnable Interface means you need
not override the run() method. We can passing the parameter
is thread . Its more than one waiting (wait())thread can be
executed.
Hi
This is Muruga. Sorry for gramatical mistake bze that my
level. If any feed back pl reply to my mail id
sunjavamuruga@gmail.com
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Are there books about seam?
Difference between swing and awt?
Why does the option tag render selected=selected instead of just selected?
what is the use of State Factories?
Explain RMI Architecture?
What are the pros and cons of detached objects?
What is a policy?
What modifiers may be used with an interface declaration?
What modifiers may be used with an inner class that is a member of an outer class?
Whats new with the stop(), suspend() and resume() methods in jdk 1.2?
What is clustering? What are the different algorithms used for clustering?
we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?
what are RemoteObjects?
What if the static modifier is removed from the signature of the main method?
Why a client should be multithreading? Explain.