Answer Posted / raja moram
The concept of suspending the execution of a function based
on the user defined condition is known as ASSERTION.
We implement the concept of Assertions using 'assert' keyword.
We use 'assert' keyword by mentioning a condition, if the
mentioned condition is not satisfied the 'assert' keyword
suspends the execution of the method in the middle and
transfers the control along with the 'AssertionError' class
object to the calling place.
Here 'AssertionError' is the subclass of 'Error'class.
To enable Assertions application:
java -ea <className>
This concept of ASSERTIONS is introduced from JDK 1.5 onwards
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Define linked list and its features with signature?
What is size of int in java?
Which list is sorted in java?
why doesn't java run on all platforms?
What do bitwise operators do?
Write the algorithm to check the number non-leaf nodes in a tree.
Variable of the boolean type is automatically initialized as?
What is boolean keyword in java?
How objects are stored in java?
What is a generic code?
What is the difference between instanceof and isinstance?
What is += mean in java?
what do you understand by synchronization? : Java thread
Explain the difference between jdk, jre, and jvm?
What is high level language in computer?