Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.nio.file.attribute.FileTime;
import java.util.concurrent.TimeUnit;

public class Main {

    public static void main(String[] args) throws Exception {

        long time = System.currentTimeMillis();
        FileTime fileTime = FileTime.fromMillis(time);

        FileTime fileTime1 = FileTime.from(time, TimeUnit.MILLISECONDS);

        System.out.println(fileTime.equals(fileTime1));

    }
}