Wednesday, March 18, 2009

How to measure distance on google maps ?

Use the page here , you just click on points and the distance will appear either in miles or in kilometers. You can also mark multiple points and calculate a real length of a path.

Wednesday, March 11, 2009

Check if a String contains letter

public static boolean containsLetter(String s) {
if ( s == null )
return false;
boolean letterFound = false;
for (int i = 0; !letterFound && i < s.length(); i++)
letterFound = letterFound
|| Character.isLetter(s.charAt(i));
return letterFound;
}