title: Writing a small Java code that can take 3 integers, and output the smallest one
body: <p>I am in the beginnings of learning Java, and have an assignment that is providing me with some difficulty (which I presume is not actually difficult).</p>
  
  <p>The instructions are as follows:</p>
  
  <p>"Within a class called MathCalculations, write a method named findMin that accepts three integers as parameters and returns the smallest of the three values. For example, the call findMin(1,10,-1) would return -1. You must use the Math class min function (which only takes 2 parameters).  Write a main method in the class that calls findMin(5, 7, 3) and prints the returned result (see below for format)."</p>
  
  <p>As the prompt states, I have to use the Math.min function, yet it only takes two parameters.  I wrote the code below that gives me the desired output for the assignment, but I do not believe I have done it in the correct way.  I am having trouble understanding what is meant by "write a method named findMin that accepts three integers as parameters."  Can anyone offer me some help?  Thanks in advance.</p>
  
  <pre><code>public class Test {
  public static void main(String[] args) {
      findMin(3);
  }       
  public static int findMin(int min) {
      int minimum = Math.min(5, 7);
      int minimum2 = Math.min(minimum, 3);
          System.out.println("The minimum of 5, 7, and 3 is " + minimum2);
          return minimum2;
    }
  }
  </code></pre>