Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

Comparison Operators
Comparision operator result always in the boolean values we also can say its gives output only in the true or false .This boolean value is most often used in an if test, as follows: 
int x = 8;
if (x < 9) {
// do something
}
      but the resulting value can also be assigned directly to a boolean primitive : 
class CompareTest {
public static void main(String [] args) {
boolean b = 100 > 99;
System.out.println("The value of b is " + b);
}
}
      We have a four comparision operators which is used for compare any combonation of integers , floating point numbers and charectors : 
* > greater than
* >= greater than or equal to
* < less than 
* <= less than or equal to
Posted By: Name:Rajesh Kr URL: Comparison Operators