| Author |
Assertion Error
|
Abhi vijay
Ranch Hand
Joined: Sep 16, 2008
Posts: 509
|
|
|
When classifying Assertion Error as being thrown by the JVM or programmatically, why is it said that its thrown programmatically??? Considering assertion is a runtime mechanism??
|
 |
Punit Singh
Ranch Hand
Joined: Oct 16, 2008
Posts: 952
|
|
NumberFormatException, IllegalArgumentException are also runtime mechanism but these are used by java developers in the code.
When you use:
Means you are responsible here to throw AssertionError with message "Illegal value of i".
|
SCJP 6
|
 |
camilo lopes
Ranch Hand
Joined: Aug 08, 2007
Posts: 202
|
|
one point important is that assert is not security that always go to run. to exame is very important pay attention in the question with assertion.
but do not forget that "is not security that assertion go to run always".
to happen one AssertionError normally the programmer did some of mistake.
|
Brazil - Sun Certified Java Programmer - SCJP 5
http://www.camilolopes.com/ About Java - Update every Week.
Guide SCJP - tips that you need know http://blog.camilolopes.com.br/livrosrevistaspalestras/
|
 |
 |
|
|
subject: Assertion Error
|
|
|