title: Calling another method inside another method?
body: <p>I am new into Java and I am trying to understand a piece of code:</p>
  
  <pre><code>public class Image {
  ...
  public float getPixel(int height, int width) {
      return data[height][width];
  }
  public void setPixel(float value, int height, int width) {
      if (value &gt; getMax())
          value = getMax();
      if (value &lt; 0)
          value = 0;
  
      data[height][width] = value;
  }
  
  private Image(String magicNumber, int height, int width, float max) {
      this.magicNumber = magicNumber;
      this.width = width;
      this.height = height;
      this.max = max;
      data = new float[height][width];
  }
  ...
  public Image clone() {
      Image clone = new Image(getMagicNumber(), getHeight(), getWidth(), getMax());
      for (int i = 0; i &lt; getHeight(); i++) {
          for (int j = 0; j &lt; getWidth(); j++) {
              clone.setPixel(getPixel(i, j), i, j); /** trying to understand this line */
          }
      }
  
      return clone;
  }
  </code></pre>
  
  <p>What does <code>clone.setPixel(getPixel(i, j), i, j);</code> exactly do? And what I mostly don't understand is what <code>clone.</code> which is before <code>setPixel(getPixel(i, j), i, j);</code> is doing?</p>