File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Assertion from witscale website 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 from witscale website" Watch "Assertion from witscale website" New topic

Assertion from witscale website

Dan Gun

Joined: Aug 06, 2003
Posts: 26
A question from the witscale site , code:

The question and and choices:
Q 23. Which of the following statements will be part of the output if this
program is executed as:
$ java Test hello
(Note: Please click on 'Exhibit' button to see the code/information.)
5.None of the above

And the answer:
The correct answer is option 1.
The assertion will fail, therefore AssertionError occurs and arg[0] (hello) is printed on console.
I thought you'd have to enable assertion specifically to get answer number 1. Therefore the answer should be number 4 since assertion is not enabled when running this class. Any thought?

SCJP 1.4
dhana rangu
Ranch Hand

Joined: Oct 01, 2003
Posts: 65
what u said seems corect.
Athe execution point
java Test hello,assertions are not enabled.So the answer will be done..

[ November 03, 2003: Message edited by: dhana rangu ]
I agree. Here's the link:
subject: Assertion from witscale website
jQuery in Action, 3rd edition