Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The VeryTime,Stay informed and read the latest news today from The VeryTime, the definitive source.

Equality Operator

10
Definition:

There are two equality operators used to determine whether equality or inequality exists between two operands:

==    is equal to. !=    is not equal to.
Both operators return a boolean value; true if the result of the equality operation is correct, otherwise false.

Examples:

int value = 10;//does the value variable equal ten? boolean isEqual = value == 10;//does the value variable not equal ten? boolean isNotEqual = value != 20;//Normally they are used as part of a control flow statement if (value == 10) {   System.out.println("Yay, the value is 10"); }

Glossary:

#ABCDEFGHIJKLMNOPQRSTUVWXYZ
Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.