gpt4 book ai didi

java - 错误 : not a statement, 如何修复此问题?

转载 作者:行者123 更新时间:2023-12-01 23:11:04 25 4
gpt4 key购买 nike

        System.out.Println("Do you want to continue ?");
if
(choice.equalsIgnoreCase("yes")||choice.equalsIgnoreCase("y"))
{
LinkedTeams.createList();
}

else
(choice.equalsIgnoreCase("no")||choice.equalsIgnoreCase("n"))

错误发生在下面语句的 Else 部分,我现在想知道我做错了什么,因为我看不到任何分号错误或常规问题

{
MainMenu.MENU();
}
}while()

}

public static void printList()
{

currentNode=headNode;

while (currentNode!=null)
{
System.out.println(currentNode.pokemonName);
Im unable to differentiate the difference between the two

System.out.println(currentNode.pokemonType);

currentNode=currentNode.next;
Just unable to find enough information }
}






}

最佳答案

 System.out.Println("Do you want to continue ?");
if
(choice.equalsIgnoreCase("yes")||choice.equalsIgnoreCase("y"))
{
LinkedTeams.createList();
}

else if
(choice.equalsIgnoreCase("no")||choice.equalsIgnoreCase("n"))

else 不接受语句,因为它已经是到达的部分。添加“if”应该可以解决。

关于java - 错误 : not a statement, 如何修复此问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21967197/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com