What is the NumberFormat class?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is the NumberFormat class?

Rating:

NumberFormat is an abstract class that is used to format numbers and currency values. This class extends the java.util.Format class. The important methods of the NumberFormat class are as follows:


  • static final NumberFormat getInstance(): This method returns the default number format for the current default Locale.


  • static final NumberFormat getCurrencyInstance(): This method returns the default currency format for the current default Locale.


  • static final NumberFormat getInstance(Locale loc): This method returns the default number format for the specified Locale.


  • public Number parse(String source): This method parses text from the beginning of the given string to produce a number. It throws the ParseException if the string cannot be parsed.


  • final String format(long number): This method takes a number value as the parameter and formats it into a number string.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.