Java tutorial
//package com.java2s; import java.text.DecimalFormat; public class Main { public static String[] userInfo; public static String formatCurrp(float f) { DecimalFormat df = new DecimalFormat("#0.00"); String currSym = userInfo[5]; if (userInfo[6].equals("false")) { return df.format(f) + currSym; } else { return currSym + df.format(f); } } }