java system time

how to get the system time using java programming

Reading system time in java

public class CurrentTime{

 public static void main(String[] args){
 
    System.out.println(System.currentTimeMillis());
    System.out.println(System.nanoTime());
    System.out.println(System.identityHashCode(new CurrentTime()));
    System.out.println(System.getProperties());
    System.out.println(System.getenv());
 }
}