Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Principal {
- public static void main(String[] args) {
- //7(2(3,9),8( ,5(6, )))
- Arbol<Integer> a1 = new Arbol<Integer>(2 ,new Arbol<Integer>(3), new Arbol<Integer>(9));
- Arbol<Integer> a2 = new Arbol<Integer>(5, new Arbol<Integer>(6), null);
- Arbol<Integer> a3 = new Arbol<Integer>(8, null, a2);
- Arbol<Integer> a = new Arbol<Integer>(7, a1, a3);
- System.out.println("Arbol: "+a.toString());
- System.out.println("Maximo nivel: "+a.MaxLevel());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement