NumberFormat Flashcards

1
Q

Gets an instance of the NumberFormat class that will format numbers according to the given locale.

A

NumberFormat.getInstance(Locale locale)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Formats the number according to the NumberFormat’s locale.

A

String format(double, float, int, or long number)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Parses the number from the given String. It returns a Long or Double instance depending on the value of the number given. Throws a ParseException if the parse fails.

A

Number parse(String source)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Returns the list of the locales supported by the Java runtime for number formatting.

A

static Locale[] getAvaliableLocales()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Returns the currency instance used by this NumberFormat object.

A

Currency getCurrency()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Returns the instance of NumberFormat suitable for currency formatting purposes; an overloaded version of this method takes a Locale as an argument.

A

NumberFormat.getCurrencyInstance()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Returns the instance of NumberFormat suitable for use for formatting integer numbers; an overloaded version of this method takes a Locale as an argument.

A

NumberFormat.getIntegerInstance()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Returns the instance of NumberFormat suitable for use for formatting percentages; an overloaded version of this method takes a Locale as an argument.

A

NumberFormat.getPercentInstance()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly