aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Assertions Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Assertions Doubt" Watch "Assertions Doubt" New topic
Author

Assertions Doubt

Jas Oberai
Ranch Hand

Joined: Jan 16, 2005
Posts: 231
Hi Friends,
I have some doubt understanding these statement,can someone please throw in some simple example(code) for each of these cases:
case1:The assert statement is being used to check a postcondition--
something that must be true when the method completes successfully.

Case2:The assert statement is being used to check a class invariant--
something that must be true about each instance of the class.

Case3:The assert statements are being used to check a precondition--
something that must be true when the method is invoked.

Thanks in Advance!!!


SCJP 1.4 (88%)<br />SCWCD 1.4 (88%)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assertions Doubt
 
Similar Threads
Assertions Doubts
dan exam doubt 12
dan exam doubt 13
Assertions
Assertion