Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  x.java
Language: JAVA
Code:
     import javax.swing.*;
class Test
public void test{
  public static void main(String[]args)
  {
  String s=JOptionPane.showInputDialog("Enter String ");
  int i=Integer.parseInt(s);
  if(i%2==0)
  {
    System.out.println(i+" is even");
    
  }
  else
  {
    System.out.println(i+" is odd");
  }
}
Comments: