这段程序会输出什么?

来自 Java 语言基础
Java 25 LTS 入门 2分钟

这段程序会输出什么?

Java
import java.util.ArrayList;
import java.util.List;

public class Main {
    static boolean test(List<String> calls, String name, boolean result) {
        calls.add(name);
        return result;
    }

    public static void main(String[] args) {
        List<String> calls = new ArrayList<>();
        boolean ready = test(calls, "first", false)
                && test(calls, "second", true);
        System.out.println(calls + " " + ready);
    }
}
在试验场中打开
报告错误