close
import java.io.*;
public class test04{
public static void main(String[] args)throws IOException
{
BufferedReader input=new BufferedReader
(new InputStreamReader(System.in));
char c;
System.out.print("請輸入一個字元 : ");
c = (char)input.read();
if(Character.isDigit(c))
System.out.print("你輸入的是數字");
else if(Character.isUpperCase(c))
System.out.print("你輸入的是大寫字母");
else if(Character.isLowerCase(c))
System.out.print("你輸入的是小寫字母");
else
System.out.print("你輸入的是什麼鬼");
}
}
全站熱搜