Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static boolean canWait = true;

    public static void waitHere() {
        waitHere("hit a key...");
    }

    public static void waitHere(String msg) {
        System.out.println("");
        System.out.println(msg);
        if (canWait) {
            try {
                System.in.read();
            } catch (Exception e) {
            } // Ignore any errors while reading.
            try {
                System.in.read();
            } catch (Exception e) {
            } // Ignore any errors while reading.
        }
    }
}