title: How to get the goldenRatio using recursion in Java?
body: <p>I'm working on this simple java recursion problem given the following directions:</p>
  
  <ul>
  <li><p>Calculate the golden ratio.</p></li>
  <li><p>Given two numbers a and b with a > b > 0, the ratio is b / a.</p></li>
  </ul>
  
  <p>I have done some code but I'm stuck on getting the recursion working properly. Here's my code:</p>
  
  <pre><code>public class MyTesting {
  
  public static void main(String[] args) {
      System.out.println(ratio(8 , 4));
  }
  
  public static double ratio(int a, int b) {
  
      int goldelRatio = 0;
      if(a &gt; b &amp;&amp; b &gt; 0){
          return goldelRatio = a / b;
      }
  
      return goldelRatio;
  }
  
  }
  </code></pre>