File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "mock: assertion " Watch "mock: assertion " New topic
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)?
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: http://aspose.com/file-tools
 
subject: mock: assertion