MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

public class MainClass {
    public static void main(String[] a) {
        long start = System.currentTimeMillis();

        // block of code to time

        long end = System.currentTimeMillis();
        System.out.println("It took " + (end - start) + " milliseconds");
    }

}