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
Can I run seam outside of jboss as?
How messaging services are done, before release of JMS?
How will you pass parameters in RMI? Why do you serialize?
What do you know about seam?
Are we allowed to change the transaction isolation property in middle of a transaction?
What is the relationship between local interfaces and container-managed relationships?
How would you create a button with rounded edges?
What is ioc concept & explain it?
What is the difference between system.out ,system.err and system.in?
What is the difference between the font and fontmetrics classes?
What is the difference between session and entity beans?
What are the purpose of introspection?
What is Stream Tokenizer?
If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?
What is the difference between static and non-static with examples?