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
Why does my function print none?
Is java hashset ordered?
Is java 11 paid version?
Write a java program that prints all the values given at command-line.
How does enum work in java?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
What is a lightweight component?
What is space character in java?
Which java version is latest?
Explain garbage collection in java?
Explain thread in java?
What is internal iteration in java se 8?
What is singleton class example?
What is qms certification?
What purpose do the keywords final, finally, and finalize fulfill?