Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.Console;
import java.io.PrintWriter;

public class Main {
    public static void main(String[] args) throws Exception {

        // creates a console object
        Console cnsl = System.console();

        // if console is not null
        if (cnsl != null) {

            // creates new print writer
            PrintWriter out = cnsl.writer();

            // prints
            out.println("Here is The Optimus Prime!!");
        }

    }
}