Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Starting a new Thread

  Asked By: Gin    Date: Jan 21    Category: Java    Views: 3108
  

Sometimes I want to start a task in a new thread. Usually I just use the
following code:

(new Thread() {
public void run() {
//some code
}
}).start();

Is it safe? Is there a better way?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Starting a new Thread Or get search suggestion and latest updates.




Tagged: