import javax.swing.JOptionPane;public class EvenOrOddTest{//Using main method to carry out the applicationpublic static void main(String args[]) {// Add a numberString Number= JOptionPane.showInputDialog("Please enter a number:");int number= Integer.parseInt(Number);// Check Is it a odd or notif (number%2 == 0) {JOptionPane.showInputDialog(null,number + "is even", JOptionPane.PLAIN_MESSAGE);}if (number%2 == 1) {JOptionPane.showInputDialog(null,number + "is odd", JOptionPane.PLAIN_MESSAGE);}} // end of method main} // end the class