/* This program will determine if an integer entered by the user is even. An integer is even if its remainder is 0 upon division by 2. */ import javax.swing.JOptionPane; class EvenIntegerTest{ public static void main(){ String userInput = JOptionPane.showInputDialog("Enter an ingeter"); int candidate = Integer.parseInt(userInput); if(candidate % 2 == 0) { JOptionPane.showMessageDialog(null,userInput + " is even"); }else { JOptionPane.showMessageDialog(null,userInput + " is not even"); } System.exit(0); } }