When you see this$_something_
in a debugger, it means that your class has a reference to the object of an outer class. This reference is created automatically by the compiler.
In your code this happens because Node
is a non-static class that is nested inside the NodeTree
class. This means that it gets a reference to its outer object, i.e. the NodeTree
set automatically.
If you do not want this behavior, make Node
static in the NodeTree
, or move it out to make it a top-level class:
public class NodeTree {
private Node start;
private int degree;
public NodeTree() {
start = new Node();
}
static private class Node {
// ^^^^^^
private Object root;
private Node[] subtrees;
private int size;
Node() { }
}
}