字符型怎么判断呢?
String a = "aa"; while(true){ if(a.equals("aa")){ System.out.println("是字符"); }else{ System.out.println("不是字符"); } return; }
String a = "aa";
System.out.println(a instanceof String);//输出值为true时则判断是字符型