How to get current Year in Java?

Views: 100 Ask New Question


How to get current Year in Java?

On By

1 Answer


Using following code you can get current year in Java

int year = Calendar.getInstance().get(Calendar.YEAR);
On By


Answer This Question