Home » JAVA Programming » Basic Datatypes » Question
  1. How to get UTC time?
    1. TimeZone.getUTC();
    2. Instant.now();
    3. Time.getUTC();
    4. Date.getUTC();
    5. None of these
Correct Option: C

In java 8, Instant.now() provides current time in UTC/GMT.



Your comments will be displayed only after manual approval.