title: Google Maps API Distance Mapping in Java
body: <p>So I have found the coordinates of two addresses using the API. I need to find out if they are within a given distance(lets say 10 miles) of each other. All examples I have found have been in JavaScript. Here is the outline of my method:</p>
  
  <pre><code>  public Boolean isClose(String[] loc1, String[] loc2){
              double x1 = Double.parseDouble(loc1[0]);
              double x2 = Double.parseDouble(loc2[0]);
              double y1 = Double.parseDouble(loc1[1]);
              double y2 = Double.parseDouble(loc2[1]);
  
  
          return true; //returns true if the two locations are in the distance specified above
      }
  </code></pre>