title: Fibonacci word via recursion in java using string
body: <p>I have only started writing in java and wrote this program:</p>
  
  <pre><code>public class FibonacciWord{
      public static void main(String[] args){
          if (args.length &lt; 3) System.exit(1);
          int N=Integer.parseInt(args[2]);
          System.out.println(fibonacci(N,args[0],args[1]));
      }
  }
  
  public String fibonacci(int N, String a, String b){
      if (N==0) return a;
      return fibonacci(N-1,a+b,a);
  }
  </code></pre>
  
  <p>And then I try to compile it gives a number of errors, the first is:</p>
  
  <pre><code>FibonacciWord.java:9 : error: class, interface, or enum expected 
  public String fibonacci(int N, String a, String b){
         ^
  </code></pre>
  
  <p>What is wrong here?</p>