I am trying to print out the object in a tree. I have a toString method defined for the object. However, I get this error:

I get a classCastException

Exception in thread "main"...