Advertisement
Guest User

Untitled

a guest
Dec 10th, 2015
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. public class HelloWorld
  2. {
  3.     public static void main(String[] args)
  4.     {
  5.         if(args.length == 0)
  6.             main(new String[] { "3", "I love you!" });
  7.         else
  8.         {
  9.             System.out.println(args[1]);
  10.            
  11.             int n = Integer.parseInt(args[0]);
  12.            
  13.             if(n > 1)
  14.             {
  15.                 args[0] = Integer.toString(n - 1);
  16.                 main(args);
  17.             }
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement