Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String[] args) throws Exception {
        long startTime = System.currentTimeMillis();

        for (int i = 0; i < 10; i++) {
            Thread.sleep(60);
        }
        long endTime = System.currentTimeMillis();
        float seconds = (endTime - startTime) / 1000F;
        System.out.println(Float.toString(seconds) + " seconds.");
    }
}
//0.625 seconds.