add two java files for sameTree