The method is only called if assertions are enabled and an AssertionError is thrown. I think that we are meant to assume that the purpose of the message() method is just to produce an appropriate message for the AssertionError. It's hard to decide if it's good or bad in my opinion.
What is tabu is to call a method which changes the computational state of the program as part of the asserted clause (left of the colon). [ October 07, 2006: Message edited by: Barry Gaunt ]
Hi Ankit, You are right that "Assertions are disabled by default" . So During runtime of the code if they are not enabled then there wont be any output. If assertions are enabled then the output will be an Assertion Error.