title: Recursive method return values in asterisks
body: <p>I'm trying to create a recursive method that returns a value, and prints the value in my main method. I'm confused on how to return and print in main() a row of X asterisks (**..)
  X being a integer on the commandline.<br>
  For example the commandline argument is 5.<br> 
  It should output to: *****<br></p>
  
  <p>My code so far:</p>
  
  <pre><code>public static void main(String[] commandlineArguments){
        if(commandlineArguments.length == 0){
           System.out.println("Please enter a least one commandline!");
        }
        else{
           Integer number = new Integer(0); //initialize number
           try{
              Integer x = Integer.parseInt(commandlineArguments[0]);
           }
           catch(NumberFormatException exception){ //NumberFormatException
              System.out.println(exception+" is not a integer!");
              System.exit(1); //end program
           }
           Integer num1 = recursiveMethods.asterisks(number); //A (return address)
           System.out.println(num1);
        }
     }
  
     public static Integer asterisks(Integer number){
        String asterisks1 = "*";
  
        for(int i = 0; i &lt; number; i++){
           return i;
        }
        return number;
  
     }
  }
  </code></pre>