java.lang.System.currentTimeMillis()のサンプル

Javaコード
package sample;
import java.sql.Timestamp;
public class TimeStamapDemo {
public static void main(String[] args) {
Timestamp timestamp = new Timestamp(System.currentTimeMillis()); System.out.println(“現在時刻:\n"  +   timestamp);
}
}

結果
現在時刻:
2018-02-15 14:11:15.034

Java

Posted by arkgame