Java Currency getDefaultFractionDigits() MethodThe getDefaultFractionDigits() is the method of Java Currency class which is used to get the number of digits after the decimal point that are normally used by the invoking currency. For example, fractional digits normally used for dollars are 2. SyntaxFollowing is the declaration of getDeafaultFractionDigits() method: Parameter
ReturnsThe getDeafaultFractionDigits() method returns the number of digits after the decimal point that are normally used by the invoking currency. ExceptionsNA Compatibility VersionJava 1.4 and above. Example 1Output: Default number of fraction digit of Indian currency is = 2 Example 2Output: Default fractional digits of US Dollar: 2 Example 3Output: Japan Yen's fraction digits: 0 Hong Kong Dollar's fraction digits: 2 Example 4Output: Enter the Currency Name: INR Currency is: Indian Rupee Fraction Digit is: 2 Next TopicJava-currency-getdisplayname-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India