Java tutorial
//package com.java2s; import java.util.Locale; public class Main { public static String formatLatitudeLongitude(String format, double latitude, double longitude) { // We need to specify the locale otherwise it may go wrong in some language // (e.g. Locale.FRENCH) return String.format(Locale.ENGLISH, format, latitude, longitude); } }