System.currentTimeMillis method
package app;
public class Main
{
public static void main(String[] args)
{
long timestamp = System.currentTimeMillis() / 1000L;
System.out.println(timestamp);
}
}
package app;
public class Main
{
public static void main(String[] args)
{
long timestamp = System.currentTimeMillis() / 1000L;
System.out.println(timestamp);
}
}
Leave a Comment
Cancel reply