Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.Instant;
import java.time.temporal.ChronoUnit;

public class Main {

    public static void main(String[] args) {
        Instant timestamp = Instant.now();
        System.out.println(timestamp);
        System.out.println(timestamp.plus(1, ChronoUnit.HOURS));

    }
}