Java Method Implementation : <p>I'm required to implement methods into a simple program to familiarize myself with them in Java.</p>

<p>My code so far is:</p>

<pre><code>import java.util.*;

public class Lab5a
{
    public static void main(String args[])
    {
        double[] a = {1, 0, 0};
        double[] b = {0, 1, 1};
        double[] c = {1, 1, 1};
        double[] d = {0, 0, 1};

        double ab = Math.sqrt (
                (a[0]-b[0])*(a[0]-b[0]) +
                (a[1]-b[1])*(a[1]-b[1]) +
                (a[2]-b[2])*(a[2]-b[2]) );

        double ac = Math.sqrt (
                (a[0]-c[0])*(a[0]-c[0]) +
                (a[1]-c[1])*(a[1]-c[1]) +
                (a[2]-c[2])*(a[2]-c[2]) );

        double ad = Math.sqrt (
                (a[0]-d[0])*(a[0]-d[0]) +
                (a[1]-d[1])*(a[1]-d[1]) +
                (a[2]-d[2])*(a[2]-d[2]) );

        System.out.println("ab=" + ab + ",  ac=" + ac + ",  ad=" + ad);     
    }
}
</code></pre>

<p>And my instructions are to: </p>

<pre><code>Next, copy the class to Lab5b.java, and replace the individual distance calculations by calls to a single
public static method that computes the distance between two points passed in as parameters. Also, implement
the method. Your method should have a signature something like the following:

    public static double distance(double[] a, double[] b)
</code></pre>

<p>I am very much new to Java and am struggling to understand what exactly the statement means.</p>
