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) {
        Object x = 50;
        Object s = "from java2s.com";

        PrintStream ps = new PrintStream(System.out);

        // print objects
        ps.print(x);
        ps.print(s);

        // flush the stream
        ps.flush();

    }
}