我了解到这static class
是 a必须在没有 a 的实例的情况下访问class
其成员。class
在下面的代码中java.util.HashMap
,jdk 1.8
public class HashMap<K,V> extends AbstractMap<K,V>
implements Map<K,V>, Cloneable, Serializable {
.........
static class Node<K,V> implements Map.Entry<K,V> {
final int hash;
final K key;
V value;
Node<K,V> next;
Node(int hash, K key, V value, Node<K,V> next) {
this.hash = hash;
this.key = key;
this.value = value;
this.next = next;
}
........
}
..........
}
调用构造函数的java语法是什么
Node(int hash, K key, V value, Node<K,V> next){...}
的嵌套static class Node
?