所以没有课程扩展as in this question,所以我想了解什么是超级()方法调用正在做什么?在这个java方法中超级关键字是什么?
我可以理解,如果关键字延伸被用作引用SO问题,但它不是。
public class Solver {
private Node result;
private class Node implements Comparable<Node> {
Node prev;
Board value;
int moves = 0;
int priority;
public Node(Board value, Node previous) {
super();
//stuff
//stuff
}
@Override
public String toString() {
//stuff
}
@Override
public int compareTo(Node node) {
//stuff
}
}
}
它调用超类的构造函数。 Java中的每个类都来自Object类。 'private class Node'扩展Object。 – Willmore
这里实际上并不需要,要么你明确地做,要么编译器会为你做。 – Kartic