title: recursion + bug at my main
body: <p>I'm using java bluejay trying to solve a recursion problem.</p>
  
  <p>The problem : given an array of natural numbers (higher then 0)
  and an int, the method needs to tell if the array consist of a way to sum up the numbers to get the given int.
  example {4,5} int = 13 >>         4+4+5 = 13 = true 
  example {4,5} int = 3 >>>  false.</p>
  
  <p>The 2nd problem is that when i use my main it says "cannot find symbol - method 
  isSumOf(int[],int) although i do have this kind of method...</p>
  
  <p>Here is my classes:</p>
  
  <pre><code>public class Ex14
  {
      static int allways;
      static int index = -1;
  
      public static boolean isSumOf(int[] s, int n){
          if(index == -1) index = s.length - 1;
              return isSumOf(s, n, index);
      }
  
      private static boolean isSumOf(int[] s, int n, int index){
          int temp = s[index];   
          if(allways == n) {return true;}
          if(allways &gt; n &amp;&amp; index != 0) {allways -= temp + s[index - 1]; 
          if(allways / s[index - 1] == s.length) index --;}
          if(allways &gt; n &amp;&amp; index == 0) return false;
          if(allways &lt; n) allways += temp; return isSumOf(s, n);
      }
  }
  </code></pre>
  
  <p>My main class:</p>
  
  <pre><code>public class bdikot
  { 
      public static void main(String[] args){
      int [] hi= new int[1];
      hi[0]=3;
  
  
      System.out.println(isSumOf(hi,7));}
  }
  </code></pre>
  
  <p>Thanks in advance Asaf :-) .</p>