老师给kitty一道题,让她先编写程序,然后检查是否合格,如果不合格,则继续编写!用bo while语句,为什么是错的呢?
package WQW;
public class QWE {
public static void main(String[] args) {
char answer;
QWE input;
do {
System.out.println("合格了吗?(y/n)");
answer = input.next();
System.out.println("");
}while(!"y".equals(answer));
System.out.println("通过测试!");
}
}