title: Can't divide by zero Fractions
body: <p>So I had have a simple application for school. Which does subtracting, dividing, multiplying and adding on fractions.</p>
  
  <p>It worked quite good, but now with 1 fraction I'm getting an error.
  Fraction: 28/16 - 42/24 </p>
  
  <pre><code>Exception in thread "main" java.lang.ArithmeticException: / by zero
  at sample.Breuk.reduce(Breuk.java:70)
  at sample.Breuk.subtract(Breuk.java:44)
  at sample.Main.main(Main.java:15)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:483)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
  </code></pre>
  
  <p>So i went to the line where it goes wrong and it turned out it was at subtracting the fraction.</p>
  
  <p>Now I calculated the fraction (28/16 - 42/24) and the result = 0.</p>
  
  <p>So I know where my bug is and what is going wrong, but I don't know how to fix this. Anybody having some tips for me?</p>
  
  <pre><code>    public Breuk subtract(Breuk other){
      int d = teller * other.teller;
      int n1 = noemer * other.teller;
      int n2 = other.noemer * teller;
      Breuk b = new Breuk(n1-n2,d);
      b.reduce();
      return b;
  }
  
      private void reduce() {
          int i = Math.min(Math.abs(noemer), Math.abs(teller));
             if (i == 0) {
                 System.out.println("Error");
             }
             while ((noemer % i != 0) || (teller % i != 0)) //BUG IS HERE//
                 i--;
             noemer = noemer / i;
             teller = teller / i;
      }
  }
  </code></pre>
  
  <p>MAIN:</p>
  
  <pre><code>  Breuk a = new Breuk(28,16);
    Breuk b = new Breuk(42,24);
    Breuk g = a.subtract(b); // Breuk A - Breuk b
    System.out.println(a + " - " + b + " = "+ g);
  </code></pre>