Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dumb question about threads #2

 
Max Bazhenov
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given the following code, which statements are true?

A. The code will fail to compile.
B. Separate threads can execute the up() method concurrently.
C. Separate threads can execute the down() method concurrently.
D. Separate threads can execute both the up() and down() method concurrently.
E. The assertion in the jump() method will not fail under any circumstances.

ANSWER: C, D
Why D is correct ?
And why E is incorrect ?

(code tags added)
[ November 12, 2004: Message edited by: Barry Gaunt ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
recent discussion
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic