Executing program gives int cannot be converted into java.lang.string : <p>I am currently using BlueJ (forced to by the module tutor, I hate it) and I'm having an error come up every time I attempt to execute the code.</p>

<blockquote>
  <p>incompatible types: java.lang.String cannot be converted into int</p>
</blockquote>

<p>My code is as follows:</p>

<pre><code>public class middle 
{
public static void main (String[] args)
{
    String numeroUno = args[0];
    String numeroDos = args[1];
    String numeroTres = args[2];

    double num1 = Double.parseDouble(args[0]);
    double num2 = Double.parseDouble(args[1]);
    double num3 = Double.parseDouble(args[2]);

    middle(num1, num2, num3);
}

public static void middle(double n1, double n2, double n3)
{
    double [] values = {n1, n2, n3};
    double newarr;
    boolean sorted = false;

    while(!sorted)
    {
        sorted = true;
        for(int i=0; i&lt;values.length-1; i++)
        {
            if(values[i] &gt; values[i+1])
            {
                double swapsies = values[i+1];
                values[i+1] = values[i];
                values[i] = swapsies;
                sorted = false;
            }
        }
    }

    System.out.print(values[1] + " is between " + values[0] + " and " + values[2]);

}
}
</code></pre>

<p>Firstly my question is where have I made the error, but secondly, is there another way to structure this code i.e completely rewrite it to achieve the same thing. I'm not really used to writing code this way and I'm having a hard time with OOP. The object of this particular exercise is to write code that will return the middle value number from what the user has input.</p>

<p>Thanks!</p>
