编写一个javaapplication字符界面的程序,接受用户输入的10个整数,并输出这10个整数的最大值和最小值。

请从速好么。。。

// 引包 import java.util.Scanner;
public static void main(String[] args) {
Scanner input = new Scanner(System.in); // 控制台输入类
System.out.print("请输入一个字符[ 如 a ]:"); // 提示输入
String word = input.next(); // 输入
if (word.length() == 1) { // 如果是一个字符
char[] character = word.toCharArray(); // 把字符串转换成 char[] 数组
int ascll = character[0]; // 获得 ascll 字符集 编码
System.out.println("字符 "+word+" 的ASCLL 码是:"+ascll); // 输出
} else {
System.out.print("请输入了一个字符!!");// 输出
}
}

有任何不明白可以Hi我,新春愉快!!!!
温馨提示:答案为网友推荐,仅供参考
相似回答