What is the NumberFormat class?

August 13th, 2008 by uCertify Leave a reply »

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.
  • Share/Bookmark
Advertisement

Leave a Reply

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