从控制台读取Int值
//package com.nowjava;//来 自 时 代 J a v a 公 众 号 - nowjava.com import java.util.Scanner; public class Main { public static void main(String[] argv) throws Exception { System.out.println(readIntValue()); } public static int readIntValue() { boolean isCorrectValue = false; Scanner console = new Scanner(System.in); int readValue = 0; do { /** from 时 代 J a v a - nowjava.com**/ if (console.hasNextInt()) { readValue = console.nextInt(); isCorrectValue = true; } else { System.out.print(