Answer Posted / saipratapreddy maddireddy
->assertions are using for debugging/ testing the flow of
program at the time of development and testing phases not
yet deployment phase.
we can use the assertions any where in java program is
valid but we have to use it in appropriate way.
->the syntax of Assertion is:
assertion(boolean): value;
*we can take any value after colon(:) that may be int,
char,string and method call
when ever assertion parameter is "true" then it will
proceed the remaining execution of program otherwise it
throw an exception saying"java.lang.AssertionError:xxxx"
assertion for testing purpose if assumption value is
false then it raises an exception but to handling this
exception by using "try-catch-finally" is not recommended.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
HOW CAN WE COMPARE TWO PDF FILES USING JSP ?
Where is jsp used?
Which directive is used in jsp custom tag?
Why do we need custom tags?
How do I run a jsp file in linux?
How many tags are provided in jstl?
What is a expression?
Explain handling of runtime exceptions.
How do I include static files within a jsp page?
What is out in jsp?
What is scriptlet, expression and declaration in jsp?
Why does jcomponent have add() and remove() methods but the component does not?
What is a jsp file?
Why is it not necessary to configure standard jsp tags in web.xml?
How is jsp used in the mvc model?