aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Assertion topic 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 "Assertion topic" Watch "Assertion topic" New topic
Author

Assertion topic

Chandana Garlapati
Ranch Hand

Joined: Jul 06, 2009
Posts: 97


The above program is from MasterExam(but slightly modified)
In the above program assert statements are false so bar() and foo() methods should be called

but why the output is done??

can anyone explain???
Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521
because when you ran the program you did not enable the assertions


scjp 1.6 91%, preparing for scmad
"Time to get MAD now.. we will get even later"....by someone unknown
Minhaj Mehmood
Ranch Hand

Joined: Jan 22, 2007
Posts: 400

try this java -ea Test


SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
Chandana Garlapati
Ranch Hand

Joined: Jul 06, 2009
Posts: 97
oh k Thank you guys..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assertion topic