add java solution for sameTree