There are many types of trees in programming, I am assuming that you are talking of a plain old binary tree.
I was thinking of the program and recalled the days when I was learning data structures for the first time
To start with, a tree node looks something like the following code.
Constructing tree is not much tricky as tree traversal is ;).
P.S The above quick code is inspired from my C/C++ way of doing it. There can be better way of doing it in Java.