Java Programming/Statements/assert

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Assertion is just simply a check point to validate the conditional statement. For Example : if you want to check a age validation which can not be exceed 18 year then we can write this statement - > Assert age >= 18:Eligible to vote;