title: Convert decimal to binary using recursion
body: <p>I got the following code:</p>
  
  <pre><code>public class decToBin {
  
  public static void main(String args[]) {
  
      int number = 32;
  
      System.out.println(decToBinWrapper(number));
  }
  
  public static String decToBinWrapper(int number) {
  
      return decToBin(number, "");
  }
  
  public static String decToBin(int number, String bin) {
      if (number &gt;= 1)
          return decToBin(number / 2, bin + Integer.toString(number % 2));
      else
          return "0";
  
  }
  }
  </code></pre>
  
  <p>which is supposed to convert a decimal to binary but it only prints "0" instead of the binary string. Could someone tell me what I'm doing wrong please?</p>