Answers for "how to get the only the year of now in java"

1

java get year

import java.time.ZoneId;
import java.util.Date;

new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().getYear();
Posted by: Guest on September-03-2020

Code answers related to "how to get the only the year of now in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language