Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

public class Main {
    public static void main(String[] args) {
        ZonedDateTime dateTime = ZonedDateTime.from(ZonedDateTime.now());
        String s = dateTime.format(DateTimeFormatter.ISO_DATE_TIME);
        System.out.println(s);
    }
}