Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Programming General (http://siteownersforums.com/forumdisplay.php?f=44)
-   -   What is the use of assert keyword? (http://siteownersforums.com/showthread.php?t=169397)

Shivangi Panwar 05-20-2016 12:46 AM

What is the use of assert keyword?
 
What is the use of assert keyword?

Swatinigam 05-27-2016 04:11 AM

assert is a java keyword used to define an assert statement. An assert statement is used to declare an expected boolean condition in a program.

Dubey675 05-30-2016 03:16 AM

Java assertion feature allows developer to put assert statements in Java source code to help unit testing and debugging. Assert keyword validates certain expressions. It replaces the if block effectively and JVM throws an error AssertionError if assertion fails. So, it is mainly used for testing purpose.

Aashi 06-05-2016 11:39 PM

The assert keyword makes an assertion about the code. It enables developers to test assumptions in their programs as a way to defect and fix bugs.

sumita 06-10-2016 01:15 AM

The assert keyword validates certain expression it is mainly use for testing purpose.


All times are GMT -7. The time now is 05:23 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.