Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Threads
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Threads and Synchronization
wht is the diffrence?
vrayudu kumar
Ranch Hand
Posts: 80
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
public class A extends Thread{
public static void main(
String
[]s) {
A a = new A();
a.start();
a.run();
}
public void run()
{
System.out.println("method from run");
}
}
Harshil Mehta
Ranch Hand
Posts: 64
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
call to start will spawn a new
thread
. whereas call to run will simply
execute in current thread.
that's all the threas are all about!!!
vrayudu kumar
Ranch Hand
Posts: 80
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Harshil
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
A question for Beginners - 3
Thread doubt
public void run ()
run method overriding -threads
problem in threads(sun accesibility test)
More...