aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Is there any method which creates..........? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Is there any method which creates..........?" Watch "Is there any method which creates..........?" New topic
Author

Is there any method which creates..........?

Manjunath Hirennavar
Greenhorn

Joined: Nov 15, 2006
Posts: 24
Hi everybody
Is there any method which creates a Thread. I encountered a question like

Which of the following method is used to create a Thread
1. start()
2. run()
3.
Murali Kakarla
Ranch Hand

Joined: Jul 11, 2007
Posts: 80
I do not think we can create a Thread using a method.

Can you please tell us the source of the question and also please post complete question with all options?

Murali...
SCJP 5 Aspirant
Manjunath Hirennavar
Greenhorn

Joined: Nov 15, 2006
Posts: 24
Thank you Murali,
I am preparing for SCJP 5 and my senior is giving me the questions so that i can realize the toughness of quwstions and be able to clear it. So before arguing with my senior i just wanted to confirm whether this question is right.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14156
    
  19

With "create a Thread", what is most likely meant here is not a new java.lang.Thread object, but a new thread that will start to run in parallell. You use the start() method of class Thread to do this, so the answer is 1.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Amit Mahajan
Greenhorn

Joined: Jul 13, 2007
Posts: 15
start() method creates a new stack on which your thread executes..
Hence answer is start() method , but actuall excecution starts when run() is called.
 
jQuery in Action, 2nd edition
 
subject: Is there any method which creates..........?