Advertisement
Jurado001

TP05_Principal

Oct 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. public class Principal {
  2.  
  3.     public static void main(String[] args) {
  4.         //7(2(3,9),8( ,5(6, )))
  5.         Arbol<Integer> a1 = new Arbol<Integer>(2 ,new Arbol<Integer>(3), new Arbol<Integer>(9));
  6.         Arbol<Integer> a2 = new Arbol<Integer>(5, new Arbol<Integer>(6), null);
  7.         Arbol<Integer> a3 = new Arbol<Integer>(8, null, a2);
  8.         Arbol<Integer> a = new Arbol<Integer>(7, a1, a3);
  9.  
  10.         System.out.println("Arbol: "+a.toString());
  11.         System.out.println("Maximo nivel: "+a.MaxLevel());
  12.        
  13.     }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement