//Following is an example, that defines three integer numbers and uses the relational operators to compare them.
class RelationalDemo {
public static void main(String[] args) {
//a few numbers
int i = 37;
int j = 42;
int k = 42;
System.out.println("Variable values...");
System.out.println(" i = " + i);
System.out.println(" j = " + j);
System.out.println(" k = " + k);
//greater than
System.out.println("Greater than...");
System.out.println("i > j = " + (i > j)); //false
System.out.println("j > i = " + (j > i)); //true
System.out.println("k > j = " + (k > j)); //false, they are equal
//greater than or equal to
System.out.println("Greater than or equal to...");
System.out.println("i >= j = " + (i >= j)); //false
System.out.println("j >= i = " + (j >= i)); //true
System.out.println("k >= j = " + (k >= j)); //true
//less than
System.out.println("Less than...");
System.out.println("i < j = " + (i < j)); //true
System.out.println("j < i = " + (j < i)); //false
System.out.println("k < j = " + (k < j)); //false
//less than or equal to
System.out.println("Less than or equal to...");
System.out.println("i <= j = " + (i <= j)); //true
System.out.println("j <= i = " + (j <= i)); //false
System.out.println("k <= j = " + (k <= j)); //true
//equal to
System.out.println("Equal to...");
System.out.println("i == j = " + (i == j)); //false
System.out.println("k == j = " + (k == j)); //true
//not equal to
System.out.println("Not equal to...");
System.out.println("i != j = " + (i != j)); //true
System.out.println("k != j = " + (k != j)); //false
}
}
Home      |      About Us      |     Portfolio      |      Services      |      Courses      |     Career      |      Cost      |      Contact Us
Services
  SEO   
  Link Building
  Data Entry
  Web Design and development
  Web Application development
 

Graphic and multimedia

  E-Commerce Solutions
  Software development
  Web Marketing & Promoting
  Internet Marketing
  IT Outsourcing
  Multimedia/CD Presentation
  Synopsis Ideas
  Project Ideas
  Placement Papers
  Live Project Training
  Programming & Projects
  Faq
  Training @balujalabs
 
 
Method
 

To Define three integers and use the Relational Operators.

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1

To Demonstrate the use of Arithmetic Operators.

2

To Demonstrate the use of Mod(%) Operator.

3 To Define three integers and use the Relational Operators.
4 To Demonstrate the use of Relational Operator
5

To Demonstrate the use of static variables.

6

To Demonstrate Ternary Operators.

7

To find whether the two strings are equal or not.

8

To calculate potential energy.

9

Print Fehrenheit to celsius table.