aspose file tools*
The moose likes Threads and Synchronization and the fly likes thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "thread" Watch "thread" New topic
Author

thread

kamal vashist
Greenhorn

Joined: Sep 13, 2006
Posts: 2
How can we create & start thread in one statement by implementing Runnable class .
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Do you know how to create an anonymous inner class?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Moving to our "Threads and Synchronization" forum.


[Jess in Action][AskingGoodQuestions]
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
try the following

new Thread(new Runnable(){
run(){
//your code
}
};
).start();

Is that what you want


Rahul Bhattacharjee
LinkedIn - Blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: thread