MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.text.NumberFormat;
import java.util.Locale;

public class MainClass {

    public static void main(String[] args) {
        NumberFormat percentFormat = NumberFormat.getPercentInstance(Locale.ENGLISH);
        for (double d = 0.0; d <= 1.0; d += 0.005) {
            System.out.println(percentFormat.format(d));
        }
    }
}