This topic contains a solution. Click here to go to the answer

Author Question: Suppose that NumberFormat currencyFormat = NumberFormat.getCurrencyInstance(Locale.US). Which of the ... (Read 141 times)

mmm

  • Hero Member
  • *****
  • Posts: 558

Question 1

Which of the following code displays the numbers with at least two digits before and after the decimal point?
◦ NumberFormat numberForm = NumberFormat.getNumberInstance(); numberForm.setMaximumFractionDigits(2); numberForm.setMinimumFractionDigits(2);
◦ NumberFormat numberForm = NumberFormat.getNumberInstance();
numberForm.setMaximumFractionDigits(2);
◦ NumberFormat numberForm = NumberFormat.getNumberInstance(); DecimalFormat df = (DecimalFormat)numberForm;
df.applyPattern("00.00");

Question 2

Suppose that NumberFormat currencyFormat = NumberFormat.getCurrencyInstance(Locale.US). Which of the following statement is legal?
◦ Number number = currencyFormat.parseCurrency("$5,000.56");
◦ Number number = NumberFormat.parse("$5,000.56");
◦ Number number = currencyFormat.parse("$5,000.56");
◦ Number number = currencyFormat.parse("5,000.56");


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by mmm on May 6, 2020

johnpizzaz

  • Sr. Member
  • ****
  • Posts: 345
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 50% of students answer this correctly




mmm

  • Member
  • Posts: 558
Reply 2 on: May 6, 2020
YES! Correct, THANKS for helping me on my review


sultansheikh

  • Member
  • Posts: 335
Reply 3 on: Yesterday
Gracias!

 

Did you know?

Walt Disney helped combat malaria by making an animated film in 1943 called The Winged Scourge. This short film starred the seven dwarfs and taught children that mosquitos transmit malaria, which is a very bad disease. It advocated the killing of mosquitos to stop the disease.

Did you know?

Anti-aging claims should not ever be believed. There is no supplement, medication, or any other substance that has been proven to slow or stop the aging process.

Did you know?

Increased intake of vitamin D has been shown to reduce fractures up to 25% in older people.

Did you know?

Many people have small pouches in their colons that bulge outward through weak spots. Each pouch is called a diverticulum. About 10% of Americans older than age 40 years have diverticulosis, which, when the pouches become infected or inflamed, is called diverticulitis. The main cause of diverticular disease is a low-fiber diet.

Did you know?

All adults should have their cholesterol levels checked once every 5 years. During 2009–2010, 69.4% of Americans age 20 and older reported having their cholesterol checked within the last five years.

For a complete list of videos, visit our video library