Advertisement
Guest User

Untitled

a guest
Sep 27th, 2018
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public class Tree {
  2.  
  3. private int data;
  4. private Tree left;
  5. private Tree right;
  6.  
  7. public Tree (int data) {
  8. this.data=data;
  9. }
  10.  
  11. public int getData() {
  12. return data;
  13. }
  14. public void setData(int data) {
  15. this.data = data;
  16. }
  17. public Tree getLeft() {
  18. return left;
  19. }
  20. public void setLeft(Tree left) {
  21. this.left = left;
  22. }
  23. public Tree getRight() {
  24. return right;
  25. }
  26. public void setRight(Tree right) {
  27. this.right = right;
  28. }
  29.  
  30.  
  31.  
  32.  
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement