Java tutorial
//package com.java2s; import java.util.Locale; public class Main { public static String formatPrice(double price) { return String.format(Locale.getDefault(), "%.1f", price); } }