• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Threas - Object Locks Question

 
Vidyavathi saravanan
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of the questions from K&B.

Assume u have a class that holds two private variables: 'a' and 'b'. Which of the following pairs can prevent concurrent access problems in that class.?



Answers: B and F
My question is why not E ?
 
Joe Borderi
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go ask your compiler.
 
Henry Wong
author
Marshal
Pie
Posts: 20882
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question is why not E ?


Simply, Choice E is not valid Java syntax.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic