import java.util.Scanner; public class code1 { public static void main(String[] args){ Scanner in = new Scanner(System.in); String name; do{ System.out.print("请猜测是谁偷吃了蛋糕:"); name=in.next(); }while(!name.equals("小红")); } }