Class FormattingExamples
java.lang.Object
net.jrodolfo.java_evolution.java05.FormattingExamples
Demonstrates formatted output APIs introduced in Java 5.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatAmount(double amount) Formats a currency-like amount with grouping and two decimal places.reverseOrder(String first, String second) Reorders arguments with explicit argument indexes.
-
Constructor Details
-
FormattingExamples
public FormattingExamples()
-
-
Method Details
-
formatAmount
Formats a currency-like amount with grouping and two decimal places.- Parameters:
amount- amount to format- Returns:
- formatted amount
-
reverseOrder
-