\begin{verbatim}
//... continued
  public double distance(GeoCoordJ other) {
    return
      6370 *
      Math.acos(
         Math.cos(this.latitude/180*3.14) *
         Math.cos(other.latitude/180*3.14) *
         Math.cos(
          (this.longitude - other.longitude)
             /180*3.14
         ) +
         Math.sin(this.latitude/180*3.14) *
         Math.sin(other.latitude/180*3.14)
      );
  }
}
\end{verbatim}
