Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.LocalDateTime;

public class Main {
    public static void main(String[] args) {

        LocalDateTime timePoint = LocalDateTime.now();
        LocalDateTime thePast = timePoint.withDayOfMonth(10).withYear(2010);

        System.out.println(thePast);
    }
}