Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

kb Q19 page 283

 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
19. Which two of the following statements are true? (Choose two.)
A. If assertions are compiled into a source file, and if no flags are included at runtime,
assertions will execute by default.
B. As of Java version 1.4, assertion statements are compiled by default.
C. With the proper use of runtime arguments, it is possible to instruct the VM to disable
assertions for a certain class, and to enable assertions for a certain package, at the same time.
D. The following are all valid runtime assertion flags:
-ea, -esa, -dsa, -enableassertions,
-disablesystemassertions
E. When evaluating command-line arguments, the VM gives �ea flags precedence over �da
flags.
The wording of D is little confusing. I took that each line is portrayed as a single command with each separated by commas. So I marked it invalid.
 
Anupam Sinha
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Barkat
Though they have said "all" but then also yes it can be confusing.
 
Darren McLeod
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the answer C and D?
 
Barkat Mardhani
Ranch Hand
Posts: 787
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic