Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Formatter;

public class Main {
    public static void main(String args[]) {
        Formatter fmt;

        for (int i = 1; i <= 10; i++) {
            fmt = new Formatter();

            fmt.format("%4d %4d %4d", i, i * i, i * i * i);
            System.out.println(fmt);
        }

    }
}