*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes AssertionError 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 "AssertionError" Watch "AssertionError" New topic
Author

AssertionError

Deepak Sagar
Greenhorn

Joined: Dec 18, 2005
Posts: 6
is throw new AssertionError is correct? please explain i am not understanding assertion properly. Where it can be used..
Cheenu Subramanian
Ranch Hand

Joined: Aug 15, 2005
Posts: 40
throw new AssertionError is a valid statement. AssertionError behaves similar to the RuntimeExceptions.. so u r not expected to catch ther error.
Thomas De Vos
stable boy
Ranch Hand

Joined: Apr 12, 2003
Posts: 425
It is possible, but inappropriate to catch AssertionError's as those are RuntimeExceptions.

For more information about assertions see here
[ January 10, 2006: Message edited by: Thomas De Vos ]

Try your free <a href="http://www.javacertificate.com" target="_blank" rel="nofollow">SCJP 1.4</a> certification centre.<br />Try your free <a href="http://www.j2eecertificate.com" target="_blank" rel="nofollow">SCWCD</a> certification centre.<br />Try your free <a href="http://www.ejbcertificate.com" target="_blank" rel="nofollow">SCBCD</a> certification centre.<br />Try your <a href="http://www.webspherecertificate.com" target="_blank" rel="nofollow">Websphere (Test 285) </a> certification centre.<br />Try your <a href="http://www.j2mecertificate.com" target="_blank" rel="nofollow">SCMAD</a> certification centre. (New)<br /> <br /><a href="http://blogs.javacertificate.com" target="_blank" rel="nofollow">Java/J2EE Certification Blogging</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AssertionError
 
Similar Threads
Serialization : True or False
AssertionError
Assertion
Using Assertions Appropriately - page 392 of SCJP6 K&B book
MasterExam question on Assertions