We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Java Currency Formatter
Java Currency Formatter
Sort by
recency
|
900 Discussions
|
Please Login in order to post a comment
// Write your code here. DecimalFormat dfc = new DecimalFormat("\u00A4#,##0.00"); DecimalFormatSymbols df=new DecimalFormatSymbols(); df.setCurrencySymbol("Rs."); dfc.setDecimalFormatSymbols(df);
import java.util.; import java.text.;
public class Solution { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double payment = scanner.nextDouble(); scanner.close();
}
in java 15
NumberFormat.getCurrencyInstance(new Locale("en","IN")).format(payment); --> this now returns the rubis char , it's been updated, the expected output of the exercice is Rs. , not the rubis icon, thats why i cannot pass the test cases
expected output should be updated.
public class Solution {
}