Write a Java program to create and display 57.32% using the DecimalFormat class. Include the necessary import statement to use the DecimalFormat class.

What will be an ideal response?


```
import java.text.DecimalFormat;
public class decimalClass
{
public static void main(String[] args)
{
DecimalFormat df = new DecimalFormat("00.00%");
System.out.println(df.format(.5732));
}
}
```

Computer Science & Information Technology

You might also like to view...

Why is the for loop a handy tool when working with arrays?

What will be an ideal response?

Computer Science & Information Technology

A(n) ________ is a picture of your computer screen, a window, or a selected region saved as a file that can be printed or shared electronically

A) icon B) clip art C) memo D) screen shot

Computer Science & Information Technology

EIR stores all IMEI serial numbers of mobile phones in a database

Indicate whether the statement is true or false

Computer Science & Information Technology

The algorithm count_if counts the occurrences of a given value in a given range satisfying a certain criterion.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology