Welcome to the Ranch
I have used the
code button on your post, and you can see how much better it looks:)
You will doubtless have heard about “IS‑A” relationships, so attempting to use members of the superclass” superclass means your class is working outside the “IS‑A” relationship. I presume you simply chose those names at random, because a branch is not a tree.
Daft example follows
If you had classes called Animal, Mammal, Dog, you might have reproduce() methods like this, remembering that the default means of reproduction in just about every sort of animal is to lay eggs:
It is a good thing that won’t compile, unless you want a dog which lays eggs!
Remember that fields are not overridden. The only thing you can override is an instance method.
You might be able to gain access to the field in the Tree class by casting, like this:
System.out.println(((Tree)this).x);