public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
double balance = 1234.56;
System.out.format("Balanceis $%,6.2f", balance);
Formatter myUSformat = new Formatter();
Formatter myFRformat = new Formatter();
String balUS = myUSformat.format("Balanceis $%,6.2f", balance).toString();
String balFR = myFRformat.format(Locale.ITALY, "Balance is $%,6.2f", balance).toString();
System.out.println("\nUS" + balUS);
System.out.println("FRANCE" + balFR);
}
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
double balance = 1234.56;
System.out.format("Balanceis $%,6.2f", balance);
Formatter myUSformat = new Formatter();
Formatter myFRformat = new Formatter();
String balUS = myUSformat.format("Balanceis $%,6.2f", balance).toString();
String balFR = myFRformat.format(Locale.ITALY, "Balance is $%,6.2f", balance).toString();
System.out.println("\nUS" + balUS);
System.out.println("FRANCE" + balFR);
}
}
No comments:
Post a Comment