Tuesday, April 10, 2018

Equality, Relational & Conditional Operators Part 3 ( Not Equal to !=)

Hi All,

Today I'm going to teach you about Not equal to operator in Java, the following is the symbol of the Not Equal Operator

!=   Not Equal

Let's see how to use this operator,

If you want to check whether X not equal to Y use as follows,

X != Y 

Let's try this in Java code,

Following video show the program









Monday, April 9, 2018

Equality, Relational & Conditional Operators Part 2 ( Equal to ==)

Hi All,

In this post I'm going to teach you guys how to use equal to operator in Java. Following is the symbol to the equal to operator.

==   equal to 

Let's see how to use this operator,

If you want to check whether X is equal to Y use as follows,

X == Y

Let's try this in Java code.

Program Video





As this equal to operator gives boolean value as the result we can assign the result value to boolean variable.


see you guys in my next post bye !!!

Equality, Relational & Conditional Operators Part 1

Hi All,

In this post, I'm going to teach you guys about Equality, Relational Operators in Java. The equality and relational operators determine if one operand is Greater than, Less than, Equal to or Not equal to another operand.

Following are the symbols of the operators

==  Equal
!=   Not Equal 
>    Greater Than
>=  Greater Than Or Equal
<    Less Than
<=  Less Than Or Equal

All these operators will compare two operands on their left and right and then give a boolean value that means true or false. 

We will learn about each of these operators in the upcoming post.