Mckenzie John wrote:
1) when is the assertionError thrown? when the condition is false - Is the value is printed as similar to an SOP along with the stackTrace?
the above one is interpreted by compiler as in
So, that means you are passing the error message to AssertionError's constructor . you can get the message using getMessage() in future.
2) If the condition is true , say the relational operator returns true ,
the coding continues without printing the value . Is my understanding correct?
Yes, with out throwing an Error.
3) In SCJP real exam, what answer must i choose if i get a question like the above is asked - what is the output of an assert statement - without mentioning anything about it being enabled or disabled? I know that assertions are disabled by default. So should i assume that even though assertion is present it has no use as assertion is not enabled and mark the choice that the coding proceeds normally?
Here I am not sure. hope, some other rancher can help you