は、 のインスタンスなしでメンバーにアクセスする必要static class
があることを学びました。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
?