Java tutorial
//package com.java2s; import java.text.DecimalFormat; public class Main { public static String getFormattedLocationString(double[] coordinates, String address) { DecimalFormat df = new DecimalFormat(); return address + " " + "Lat: " + String.format("%.4f", coordinates[0] / 1E6) + " Lon: " + String.format("%.4f", coordinates[1] / 1E6); } }