Created a private class in TreeDemo extending Node with the id() field.