logo image

How to get current Year in Java?


How to get current Year in Java?

1 Answer

2 years ago by

Using following code you can get current year in Java

int year = Calendar.getInstance().get(Calendar.YEAR);
2 years ago by Megamind