| Author |
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)?
|
boolean b = true;<br />System.out.println ("I believe in Java.<br />Java will make my dream come " + b);
|
 |
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
|
 |
 |
|
|
subject: mock: assertion
|
|
|