Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.LocalDate;
import java.time.LocalDateTime;

public class Main {
    public static void main(String[] args) {
        LocalDate tomorrow = LocalDate.now().plusDays(1);

        // before 5 hours and 30 minutes
        LocalDateTime dateTime = LocalDateTime.now().minusHours(5).minusMinutes(30);

        System.out.println("additionSubtraction: tomorrow: " + tomorrow);
        System.out.println("additionSubtraction: dateTime: " + dateTime);

    }
}