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 143 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
Great answer, keep it coming :)


AngeliqueG

  • Member
  • Posts: 343
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

The average office desk has 400 times more bacteria on it than a toilet.

Did you know?

Hyperthyroidism leads to an increased rate of metabolism and affects about 1% of women but only 0.1% of men. For most people, this increased metabolic rate causes the thyroid gland to become enlarged (known as a goiter).

Did you know?

Historic treatments for rheumatoid arthritis have included gold salts, acupuncture, a diet consisting of apples or rhubarb, nutmeg, nettles, bee venom, bracelets made of copper, prayer, rest, tooth extractions, fasting, honey, vitamins, insulin, snow collected on Christmas, magnets, and electric convulsion therapy.

Did you know?

Bisphosphonates were first developed in the nineteenth century. They were first investigated for use in disorders of bone metabolism in the 1960s. They are now used clinically for the treatment of osteoporosis, Paget's disease, bone metastasis, multiple myeloma, and other conditions that feature bone fragility.

Did you know?

The average adult has about 21 square feet of skin.

For a complete list of videos, visit our video library