Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.Duration;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.temporal.Temporal;

public class Main {
    public static void main(String[] args) {
        Duration duration = Duration.ofDays(2);
        Temporal l = duration.subtractFrom(LocalDateTime.now());

        System.out.println(l);
    }
}