1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ella [17]
3 years ago
15

Write code statements to create a DecimalFormat object that will round a formatted value to four decimal places. Then write a st

atement that uses that object to print the value of result, properly formatted.
Computers and Technology
1 answer:
KonstantinChe [14]3 years ago
3 0

Answer:

Following is the code in Java Language :

DecimalFormat form1= new DecimalFormat ("0.####");  // create an instance of                                                                                            .                                                                                            //DecimalFormat

System.out.println (form1.format(res)); // display the value in proper format

Explanation:

Following are the description of the program

  • Firstly we create the instance of DecimalFormat i.e  "form1"  that will round a formatted value to four decimal places. To create an instance or object of the class we can use a new keyword.
  • Finally, we print the format by using the format method.In the format method, we pass the variable "res".The System.out.println() is used to display the value of the format.
You might be interested in
Which individual of the following would be most likely to be directly concerned with web security?
prohojiy [21]
Network Engineer is correct.
4 0
3 years ago
Read 2 more answers
10(            )  8(532.2 )                         
blagie [28]

Answer:

346.30

Explanation:

7 0
3 years ago
What website can help you find antivirus software
WITCHER [35]
<span>CNET hope this helps</span>
4 0
3 years ago
Read 2 more answers
What is the output of the following?
lys-0071 [83]

Answer: a. the number is: 14

Explanation:

i mean just try to write in 7 instead of x in the second line

then it would say the number is: ....

what is 7 times 2?

14

so the answer is a

5 0
2 years ago
If you play gta and don't know the song ''Glamorous'' Then what do you even do when you play?
Paraphin [41]
You literally don’t do anything you’re just like dead of sun
4 0
2 years ago
Read 2 more answers
Other questions:
  • After you enter the details for the first selected recipient in the New Address List dialog box, click _______ to add another re
    11·2 answers
  • Discuss Hashing and how it is utilized within the IT industry. Also, discuss how Hashing can improve our sorting and searching r
    12·1 answer
  • . Constructors can / cannot (circle correct choice) be called explicitly as if they were regular member functions.
    10·1 answer
  • Given an integer n and an array a of length n, your task is to apply the following mutation to an: Array a mutates into a new ar
    5·1 answer
  • A student opens a recently purchased software package and begins reading the enclosed materials. What information might be inclu
    6·1 answer
  • Which screen should be open to customize or personalize a desktop background?
    15·2 answers
  • Why is there no I do you time of day when all students should study
    10·1 answer
  • What is one disadvantage of transmitting personal data using digital signals?
    15·2 answers
  • What is a good range for CPU usage to be considered running well?
    15·1 answer
  • Please choose odd one out please tell fast​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!