62,623
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
byte[] inBytes = new byte[3];
System.in.read(inBytes);
String content = new String(inBytes);
System.out.println(("XYZ".equals(content)));
}
byte[] b = new byte[20];
try {
System.in.read(b);
} catch (IOException e) {
e.printStackTrace();
}
String str = new String(b).trim();
//System.out.println(str);
if (str.equals("XYZ")) {
System.out.println("Good");
} else {
System.out.println("Bad");
}
if("XYZ".equals(str))