Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.*;

public class Main {

    public static void main(String[] args) {
        int c = 123;

        PrintStream ps = new PrintStream(System.out);

        // print an integer and change line
        ps.println(c);
        ps.print("from java2s.com");

        // flush the stream
        ps.flush();

    }
}