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 of the following is not a shared characteristic of new media.
tensa zangetsu [6.8K]
The last one , info is not sparse or little , we have plenty of it
6 0
3 years ago
Write a program that allows the user to continuously input the value n until a negative number is entered
Paul [167]

Answer:

Written in C++

Explanation:

#include <iostream>

using namespace std;

int main()

{

int n;

while(true)

{

cin>>n;

if(n>=0)

continue;

break;

}

return 0;

}

3 0
2 years ago
Pleassseeeee helppp!!!!
AnnZ [28]

Answer:

html

Explanation:

6 0
3 years ago
What are the five layers in the internet protocol stack? What are the principal responsibilities of each of these lay?
mariarad [96]

Solution:

The five Layers in Internet protocol stack are:

1.Application Layer  

2.Transport Layer  

3.Network Layer  

4.Link Layer  

5.Physical Layer  

The principal responsibilities of these layers are as follows:

1.Application Layer •Applications with appropriate requirement for user.  

•It is reserved for network applications and their application protocols such as HTTP, SMTP, and FTP etc.  

•Its protocol uses transport layer protocols for establishing host-to-host connection.  

2.Transport Layer  

•It is responsible for End-to-Communication  

•Transport layer transports messages from application layer between client and server of application  

•It uses two protocol for transporting messages: TCP and UDP.TCP provides reliable connection oriented services, while UDP provides connectionless service  

3.Network Layer  

•Network Layer moves packets from one host to destination.

•It has two principal component:IP protocol:-It defines the datagrams and decide how the end system and router will work Routing protocols: these protocols decide the routing path between source and destination. 4.Link Layer  

•It is responsible for link-level communication  

•Link layer receives the data gram from network layer at each node and delivers it to next node, the next node passes the datagram to network layer.so This layer moves entire frames from one network element to adjacent one.

•The service provided by link layer is protocol dependent

5.Physical Layer  

•It provides Physical media

•At each node, it moves individual bits of frames to next node.  


7 0
3 years ago
A network is a group of two or more computers or devices connected together. To be able to connect, they each need a
Kay [80]
D. Internet service protocol (isp)
6 0
3 years ago
Read 2 more answers
Other questions:
  • Marie uses a browser to visit a blog. What is the unique identifier of the blog?
    5·1 answer
  • Ian is working as a sales manager. He has to generate sales reports using mathematical data that his team has collected. Which c
    15·1 answer
  • Write and run a Python program that asks the user for a temperature in Celsius and converts and outputs the temperature in Fahre
    10·1 answer
  • The "network of networks," consisting of LANs (Local Area Networksnetworks connecting two or more computers, usually within the
    5·1 answer
  • Write a method called makeLine. The method receives an int parameter that is guaranteed not to be negative and a character. The
    11·1 answer
  • What is a googleplex?
    7·1 answer
  • What should be used to clean LCD monitors? Liquid window cleaner Ammonia wipes Windshield washer liquid Antistatic monitor wipes
    15·1 answer
  • Explain the importance of mobile computing in communication​
    7·2 answers
  • What is the main difference between a peripheral device and other types of devices? Choose the best answer.
    12·1 answer
  • Different the policies and protocols in the industry
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!