Assert statement contains two part:
assert firstPart : secondPart;
I know firstPart
must be a boolean expression or boolean variable.
But I have a confusion with secondPart
. What it can be?? It may be just an error message as a string? Or it could also be a method? It should only return a String or anything?
Please clarify me the requirements, restrictions and nuances relating to the secondPart
of assert statement.