Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Use of assert keyword in Java
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Deepak Kumar
Use of assert keyword in Java
1 Answer(s)      4 years and 3 months ago
Posted in : Java Beginners


Hi,

What is the purpose of assert keyword used in JDK?

Thanks

Advertisement
View Answers

October 5, 2010 at 4:45 PM


Hi Friend,

It is used to validate an expression. It is a keyword that is represented by a boolean expression and enables you to test your assumptions about your program. It evaluates to true, but if the expression is not true, the system will throw an error through an AssertionError.

For more information, visit the following link:

http://www.roseindia.net/javatutorials/use-assertion-in-java.shtml

Thanks


Related Tutorials/Questions & Answers:
Use of assert keyword in Java - Java Beginners
Use of assert keyword in Java  Hi, What is the purpose of assert keyword used in JDK? Thanks   Hi Friend, It is used to validate an expression. It is a keyword that is represented by a boolean expression
assert In Java
features that it have. To use assertion in Java there is a keyword named assert... testing. Use of assert keyword in Java improves the quality of code...assert In Java In this section we will discuss about the assert keyword
Advertisements
How to use this keyword in java
How to use "this" keyword in java       The keyword this is useful when you need to refer... use this keyword. Here, this section provides you an example with the complete
Assert in Java
In this section we will discuss about what is assertion, how to use assert keyword and benefits of assertion in Java. We have also provided an example... assert keyword. It can be expressed in two ways: assert expression
assert,access modfier - Java Interview Questions
assert,access modfier  can someone explain to me what assertion is all about in java. and what access modifier is transient  Hi Friend.../javatutorials/use-assertion-in-java.shtml Transient Modifier: The transient
Java keyword
Java keyword  Is sizeof a keyword
How to use 'continue' keyword in jsp page ?
How to use 'continue' keyword in jsp page ?       This is detailed java code that shows how to use 'continue' keyword in jsp page. The continue statement skips
this java keyword
this java keyword       "this" is a keyword defined in the java programming language. Keywords... in java programming language likewise the this keyword indicates the following
Explain the use of the ‘LIKE’ keyword used in the WHERE clause?
Explain the use of the ?LIKE? keyword used in the WHERE clause?   Explain the use of the ?LIKE? keyword used in the WHERE clause
Explain the use of the ‘LIKE’ keyword used in the WHERE clause?
Explain the use of the ?LIKE? keyword used in the WHERE clause?   Explain the use of the ?LIKE? keyword used in the WHERE clause
static keyword in java
.style1 { color: #0000FF; } static keyword in java We are going to discuss about static keyword in java. The static keyword is a special keyword in java programming language. A static member belongs to a class
transient keyword - Java Beginners
transient keyword  what is transient keyword in java.? plz explain with example
while Java Keyword
while Java Keyword       The while is a keyword defined in the java programming language... to a compiler in java programming language likewise the while keyword indicates
volatile Java Keyword
volatile Java Keyword       The volatile is a keyword defined in the java programming language... to a compiler in java programming language likewise the volatile keyword indicates
true Java Keyword
true Java Keyword       The true is a keyword defined in the java programming language. Keywords... in java programming language likewise the true keyword indicates the following
void Java Keyword
void Java Keyword       The void is a keyword defined in the java programming language. Keywords... in java programming language likewise the void keyword indicates the following
transient Java Keyword
transient Java Keyword       The transient is a keyword defined in the java programming language... to a compiler in java programming language likewise the transient keyword indicates
throws Java Keyword
throws Java Keyword       throws " is a keyword defined in the java programming language. Keywords... in java programming language likewise the throw keyword indicates the following
super Java Keyword
super Java Keyword       The super is a keyword defined in the java programming language... to a compiler in java programming language likewise the super keyword indicates
static Java Keyword
static Java Keyword       The static is a keyword defined in the java programming language. Keywords... in java programming language likewise the static keyword indicates the following
Using throw keyword in exception handling in Core Java
Description: Core Java Throw Function is used for throwing the exception. The throw keyword tells the compiler that it will be handled by calling a method... exception need to be thrown from the calling method. Code for Java Throw Exception
synchronized Java Keyword
synchronized Java Keyword       The synchronized is a keyword defined in the java programming... relevant to a compiler in java programming language likewise the synchronized keyword
short Java Keyword
short Java Keyword       The short is a keyword defined in the java programming language. Keywords... in java programming language likewise the short keyword indicates the following
try Java Keyword
try Java Keyword       The try is a keyword defined in the java programming language. Keywords... : -- The try keyword in java programming language is used to wrap the code in a block
switch Java Keyword
. Example to use the Switch keyword within a class in java programming language... switch Java Keyword       The switch is a keyword defined in the java programming language. Keywords
java - Hibernate
Java assert keyword example  What is the assert keyword? Can anyone explain it with the help of an example
The new keyword in java
The new keyword in java In this section you will learn about new keyword in java. The new keyword is used to create a instance of a class. The new keyword... declaration. Creating  an object by new keyword this is nothing
Return Java Keyword
Return Java Keyword       The return is a keyword defined in the java programming language. Keywords... in java programming language likewise the return keyword indicates the following
Java final Keyword Example
Java final Keyword Example In this section we will read about the final keyword in Java in various context. final keyword in Java can be used... the final keyword can be used in Java applies its main integrity i.e.
throw Java Keyword
throw Java Keyword       "throw " is a keyword defined in the java programming... to a compiler in java programming language likewise the throw keyword indicates
Private Java Keyword
Private Java Keyword       private is a keyword defined in the java programming language. Keywords... in java programming language likewise the private keyword indicates the following
Advertisements
 

 

 

DMCA.com