...

/

The Class DecimalFormat

The Class DecimalFormat

In this lesson, we will explore how to control the appearance of our numerical output.

We'll cover the following...

Program output so far

Up to now, we have had little control over the format of output from println statements. For example, when we display a real value, the number of places shown after the decimal point is left to the system to choose. Sometimes that is good enough, but other times we always will want a certain number of digits to appear. We’ll look at a class in the Java ...