Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Dan's Q of Assertion? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Dan Watch "Dan New topic
Author

Dan's Q of Assertion?

Vishy Karl
Ranch Hand

Joined: Sep 08, 2003
Posts: 116
Following is the Q from Dan's Exam

Ans given are a,b,d.
Why is b also correct ?? If assertions r disabled then how will it show AssertionError message ?
TIA.
bye


"The man who can drive himself further once the effort gets painful is the man who will win." <br />Roger Bannister
Rama Kumar PV
Greenhorn

Joined: Dec 26, 2003
Posts: 26
It is just like any other error/exception and is not related to enabling or disabling of assertions. Enabling/Disabling of assertions will affect only those lines having the assert keyword followed by a boolean expression.
Rama
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dan's Q of Assertion?