我正在制作这个角色创作程序。我正在使用Eclipse,它说没有问题,但它没有读取我的代码的一部分。发生了什么,我该如何解决?
import java.util.Scanner;
public class Character
{
static Scanner scan = new Scanner(System.in);
public static void main(String[] args)
{
String play = "yes";
String play1;
String play2;
String play3;
while (play.equals("yes"))
{
System.out.println("Let's create a character!");
System.out.println("Select a type of headwear. (bald, hair, hat)");
play1 = scan.next();
System.out.println("Select a type of shirt. (no sleave, short sleave, long sleave)");
play2 = scan.next();
System.out.println("Select a type of pants. (short, medium, long)");
play3 = scan.next(); \\does not read this part
System.out.println("Your character:");
代码后跟一个巨大的嵌套if块。