I'm have one question.
I have class Node
public class Node {
public final Key KEY;
public final Value VALUE;
//Other fields and methods.
}
Method add
public void add(Key key, Value value) {
this.key = key;
this.value = value;
//Other code
}
And this code:
//something here...
private Node node = new Node();
//Some code
add(node.KEY, node.VALUE);
node = null;
Is there node
object will be utilized by garbage collector exclusive KEY
and VALUE
fields or node
object with all another fields will be saved in memory?