You are here: Home / Topics / Simple If statement example in Java

Simple If statement example in Java

Filed under: Java on 2023-08-12 20:39:45

// Simple if example

class  SimpleIf
{
public static void main(String args[ ] )
{
 int  n;
 
 n = 230;

 if( n > 100 )
 {
  System.out.println( " The number is greater than 100." );
 }
}
}


Output:

The number is greater than 100.


About Author:
J
Java     View Profile
Hi, I am using MCQ Buddy. I love to share content on this website.