Parameters(integers)
<p>I am a beginner in java and i am doing practiceit questions from the internet.I stumbled upon this question and i got stuck.</p>

<p>Write a method called distance that accepts four integer coordinates x1, y1, x2, and y2 as parameters and computes the distance between points (x1, y1) and (x2, y2) on the Cartesian plane. 
For example, the call of distance(1, 0, 4, 4) would return 5.0 and the call of distance(10, 2, 3, 5) would return 7.615773105863909.</p>

<pre><code>public static int distance(int x1,int y1,int x2,int y2){
   int d=(x2-x1)*(x2-x1)-(y2-y1)*(y2-y1))^0.5;
    return (double)d;

}
</code></pre>

<p>2 things i will like to clarify.How come when i use ^,they keep giving me an error to say it cannot be applied.Secondly,i try casting double inside one of number in the equation.But it keeps giving me an error too.</p>
