title: How to write a method that takes int variables and returns the largest?
body: <p>I am trying to write a method that compares 3 numbers and returns the largest of them.</p>
  
  <p>This is my code, but it doesn't work...</p>
  
  <pre><code>public int max(int x, int y, int z){
      return Math.max(x,y,z);
  } 
  </code></pre>
  
  <p>How can my code be corrected?</p>