• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Threads Priority values

 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
the answer to Quetion 19 in the Thread beta section of Dan states that
Thread.MIN_PRIORITY = 0.
while it should be
Thread.MIN_PRIORITY = 1.
check this out.
http://java.sun.com/j2se/1.4/docs/api/
 
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shishio San:
hi,
the answer to Quetion 19 in the Thread beta section of Dan states that
Thread.MIN_PRIORITY = 0.
while it should be
Thread.MIN_PRIORITY = 1.
check this out.
http://java.sun.com/j2se/1.4/docs/api/


Shishio,
Thank you for pointing that out. I just uploaded the correction.
I develop the exams in XML and then transform them to HTML using XSLT. The correct answers are marked "true" and the incorrect answers are marked "false". If I start adding new answer options or shift the order around then it becomes easy to get the wrong attribute associated with an answer option element. I try to avoid that sort of error but sometimes it happens. I'm happy that you caught it will it is still in the beta directory.
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In case anyone is looking for a thread exam I should also mention that the URL is as follows.
http://www.danchisholm.net/beta/threads.html
The exam has 36 questions but does not yet cover all of the thread material necessary for the SCJP exam. (Since I am still in the process of building the thread exam I probably should have called it an "alpha" version.) So far, the thread exam has had more than 70 hits but I hope that it will get a lot more before I incorporate it into the regular version of my exam.
 
Shishio San
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
np Dan.
Keep up the good work
Thx
 
Shishio San
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more thing Dan.
Question 23)
The comment about the answer is:


If a Runnable target object is passed to the constructor of the Thread class, then the Thread.run method will invoke the run method of the Runnable target. In this case, the Thread.run method is overridden by the subclass. Since


I think you didn't compelete it yet
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shishio San:
One more thing Dan.
Question 23)
The comment about the answer is:

I think you didn't compelete it yet



Shishio,
Thank you for pointing that out. I just uploaded the correction.

The answer is "a. Prints: A".
The corrected answer is as follows.


If a Runnable target object is passed to the constructor of the Thread class, then the Thread.run method will invoke the run method of the Runnable target. In this case, the Thread.run method is overridden by A.run. The A.run method does nothing more than print the letter A. The invocation of the A.start method inside the main method results in the invocation of A.run and the letter A is printed. The B.run method is never invoked.

 
Straws are for suckers. Now suck on this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic