Monday, May 30, 2016

JAVA assertions

Java object oriented concepts



  • JAVA assertions (assert)

                   An assertion is a statement in the JavaTM programming language that enables you to test your assumptions about your program. For example, if you write a method that calculates the speed of a particle, you might assert that the calculated speed is less than the speed of light.

assert( boolean ):[non-void methord / value];