Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3.  
  4. public class Main {
  5.     public static void main(String[] args) {
  6.  
  7.  
  8.         Scanner input = new Scanner(System.in);
  9.         Generator Tree = new Generator();
  10.  
  11.         System.out.println("Lines of tree: ");
  12.         int x;
  13.  
  14.         while (x == null)
  15.         {
  16.             try
  17.             {
  18.                 x = input.nextInt();
  19.             }
  20.             catch (InputMismatchException e)
  21.             {
  22.                System.err.println("Enter a number douchebag:") 
  23.             }
  24.         }
  25.  
  26.         Tree.setRows(x);
  27.  
  28.         Tree.printTree();
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement