gpt4 book ai didi

java - <标识符> 预期错误

转载 作者:行者123 更新时间:2023-12-01 19:05:09 27 4
gpt4 key购买 nike

所以我有一些代码正在尝试编译,但我不断收到此错误:

3SATSolver.java:3: <identifier> expected

这是代码。我只是没有看到什么吗?

import java.util.ArrayList;

public class 3SATSolver {

public static void main (String[] args) {
ArrayList values = new ArrayList<Boolean> ();
for (int i = 0; i < args.length; i++) {
Boolean d = new Boolean (args[i].charAt(0), Integer.parseInt(args[i].substring(1)));
}
}
}

最佳答案

Java 中标识符不能以数字开头。

关于java - <标识符> 预期错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10360903/

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