Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes kb Q19 page 283 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 "kb Q19 page 283" Watch "kb Q19 page 283" New topic
Author

kb Q19 page 283

Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
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

Joined: Apr 13, 2003
Posts: 1088
Hi Barkat
Though they have said "all" but then also yes it can be confusing.
Darren McLeod
Greenhorn

Joined: Jul 07, 2003
Posts: 19
Is the answer C and D?


SCJP, SCBCD
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
Yes
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: kb Q19 page 283
 
Similar Threads
When assertions are executed
Assertion statements and their compilation
Assertion Flags
assertions
Help