很简单的
Scanner na=new Scanner(System.in);
String s="a";
System.out.println("请写出"+s+"的大写");
if(na.nextLine().equals(s.toUpperCase())){///判断输入的值和S的值大写是否相等
System.out.println("你真棒!");
}else{
System.out.println("继续努力吧!");
}
import java.io.IOException;
public class test {
public static void main(String[] args) throws IOException {
System.out.println("a");
char i= 0;
i=(char)System.in.read();
if((String.valueOf(i)).equals(("a".toUpperCase())))
System.out.println("你真棒!");
else
System.out.println("继续努力!");
}
}
char ch='a';
ch=(char)(ch-32);
System.out.println(ch);
判断自己写