MyClass.java
 

public class MyClass {
  public static void main(String[] args) {
    int time = 20;
    if (time < 18) {
      System.out.println("Good day.");
    } else {
      System.out.println("Good evening.");
    }  
  }
}

Result:
Good evening.