aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt in Marcus ex#2 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 "Doubt in Marcus ex#2" Watch "Doubt in Marcus ex#2" New topic
Author

Doubt in Marcus ex#2

kannan al
Greenhorn

Joined: Oct 08, 2000
Posts: 5
What can cause a thread to stop executing?
1) The program exits via a call to System.exit(0);
2) Another thread is given a higher priority
3) A call to the thread's stop method.
4) A call to the halt method of the Thread class
Q 2: When another thread is given a higher priority, will a thread
stop or move into a ready to run state.
kindly clarify.

Thanks,
kannan.
[This message has been edited by kannan al (edited October 08, 2000).]
Khurram Fakhar
Ranch Hand

Joined: May 29, 2000
Posts: 65
Hi partner,
Thread Cant be stopped by just giving the higher priority to another thread.
Ya it will be added in the ready state again.
Thread Schedular basically determines the priorities.
Regards
Khurram
hema janani
Ranch Hand

Joined: May 19, 2000
Posts: 70

for the exams the ans to ur Qs is
1) The program exits via a call to System.exit(0);--true
2) Another thread is given a higher priority --true
3) A call to the thread's stop method.--true
4) A call to the halt method of the Thread class--false
(coz there is no method as halt in java)
regds
hema
chetan nain
Ranch Hand

Joined: Jun 21, 2000
Posts: 159
also, the answer to your second question is "no"
since we do not know the compiler personally
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in Marcus ex#2