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
Explain the jsp life cycle?
Can we use jsp implicit objects in a method defined in jsp declaration?
Differentiate between pagecontext.include and jsp:include?
How does a jsp function?
What are the different types of jsp tags?
Which jsp lifecycle methods can be overridden?
What are the implicit, internal el jsp objects and their differences from jsp objects?
How to create menu in jsp with example?
What do you mean by context initialization parameters?
What is the purpose of
What is action tag in jsp?
Can we use javascript with jsp pages?
What are the implicit objects in jsp?
What is jsp custom tag and what are it’s components?
What is the advantage of using getProperty action, as compared to the accessor method?