星期一, 10月 17, 2005

answer

import javax.swing.JOptionPane;

public class Untitled1 {
public Untitled1() {
}


public static void main(String[] args) {

String myString=JOptionPane.showInputDialog("Enter a number: ");
int myNumber=Integer.parseInt(myString);
System.out.println("The number is "+myNumber);
System.exit(0);
}
}

沒有留言: