if statement : If « Language Basics « Java






if statement

if statement
public class Retirement {
  public static void main(String[] args) {

    int goal = 100;
    int payment = 500;
    if (goal < payment) {
      System.out.println("Happy.");

    }
  }
}
           
       








Related examples in the same category

1.if Else Demo
2.If ElseIf Else
3.if Else 2if Else 2
4.if statement demoif statement demo