Meaningless Drivel is fun!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes mock: assertion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "mock: assertion " Watch "mock: assertion " New topic

mock: assertion

adam Lui
Ranch Hand

Joined: Sep 03, 2007
Posts: 186
1. public class AssertionTest {
2. public static void main(String[] args) {
3. // insert here
4. System.out.print(" After assert");
5. }
6. }
Which of the following inserted at line 3 will generate the assertion error with the message Test?
A. assert (true): Test;
B. assert (false): Test;
C. assert (true): "Test";
D. assert (false): "Test";
E. assert false: "Test";

answers are : D and E
but doesnt it use that IF condition format ( condition: true? false)?
raghu dubey
Ranch Hand

Joined: Jul 05, 2007
Posts: 72
Nope. It does not use the IF format. See K&B chap 5...last 4-5 pages of that chap.

Thanks,<br />Raghu.<br /> <br />SCJP 5, SCWCD 1.4, NCFM
I agree. Here's the link:
subject: mock: assertion
It's not a secret anymore!