title: I am getting "java.lang.ArithmeticException: / by zero" when I run my program
body: <p>Hello I am learning Java and I am trying to get 3 images that are 300x300, 600x600, and 900x900 pixels and scramble it by splitting the image into a 3X3 grid and then mixing each 3x3 square in that image to generate a random mix every time I run my program. I decided to do it by putting all the pixels into an array and then scrambling that image where  the length /3 gives me a remainder of 0. However I am getting the error "java.lang.ArithmeticException: / by zero". Can someone help me fix my problem please. </p>
  
  <pre><code>public void randomPictureShift(Picture scrambledImage){
  Pixel blankImage [] = this.getPixels();
   Pixel originalImage [] = scrambledImage.getPixels();
  
  //-----------------------------------------------------------------------
  Random r = new Random();
  for (int i = originalImage.length; i &gt; 0; i--) {
    int index = r.nextInt(i);
  //-----------------------------------------------------------------------
    if ((i)%(1/3) == 0){
      //swap
      Pixel tmp = originalImage[index];
      originalImage[index] = originalImage[i];
      originalImage[i] = tmp;
  </code></pre>