?? exercise2_10.java
字號:
/**
* Title: Exercise Solutions
* Description: Solutions to the exercises for Introduciton to Java Programming with JBuilder 4
* Copyright: Copyright (c) 2000
* Company: Armstrong Atlantic State University
* @author Y. Daniel Liang
* @version 1.0
*/
import javax.swing.JOptionPane;
public class Exercise2_10 {
/**Main method*/
public static void main(String[] args) {
// Prompt the user to enter an integer
String intString = JOptionPane.showInputDialog(null,
"Enter an integer:",
"Exercise2_10 Input", JOptionPane.QUESTION_MESSAGE);
// Convert string to int
int number = Integer.parseInt(intString);
// Display results
System.out.println("Is " + number + " an even number? " +
(number % 2 == 0));
System.exit(0);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -