fork download
  1. public class Main {
  2. public static void main(String[] args) {
  3. int myNum = -1;
  4.  
  5. if (myNum % 2 == 0) {
  6. System.out.println(myNum + " is even");
  7. } else {
  8. System.out.println(myNum + " is odd");
  9. }
  10. }
  11. }
  12.  
Success #stdin #stdout 0.09s 53584KB
stdin
Standard input is empty
stdout
-1 is odd