tag:blogger.com,1999:blog-8712770457197348465.post3030440650687365842..comments2024-03-19T05:51:39.935-07:00Comments on Javarevisited: What is Assertion in Java - Java Assertion Tutorial Examplejavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-8712770457197348465.post-40415929494799266622015-09-17T23:13:29.304-07:002015-09-17T23:13:29.304-07:00I think Javin Paul has missed out a very important...I think Javin Paul has missed out a very important point of Assertion in java which is it is disabled by default. Hence, it has no overhead in performance issue. <br />http://docs.oracle.com/javase/7/docs/technotes/guides/language/assert.html#enable-disable<br /><br />Anonymoushttps://www.blogger.com/profile/15895867333136298034noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-18166890178026854262013-12-01T00:31:29.580-08:002013-12-01T00:31:29.580-08:00"do not use assertion to validate arguments o..."do not use assertion to validate arguments or parameters of public method."<br />Please Explain this point more with a good example.<br /><br /> <br />Srikanth goudhttps://www.blogger.com/profile/17536578283293046379noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-15324950260757583792012-05-23T23:02:35.298-07:002012-05-23T23:02:35.298-07:00I love Junit because of Assertion. JUnit uses Asse...I love Junit because of Assertion. JUnit uses Assertion at its best. methods like assertEquals(), assertTrue() are just remarkable and shows how powerful assertion mechanism can be. We have been using assert keyword to test precondition of private methods from long time and benefited a lot. we also learned from mistake of using assertion to validate argument of public method which is apparently Tahirhttp://en.wikipedia.org/wiki/Assertion_(computing)noreply@blogger.com