How do you get the current year as an Integer value in Java?

Asked 1 years ago, Updated 1 years ago, 73 views

I'd like to get the price of Integer from Java for what year is this? To write java.util.Date() It's been declared. Is there any other way?

datetime java date

2022-09-22 22:16

1 Answers

int year = Calendar.getInstance().get(Calendar.YEAR); You can do it in this way.


2022-09-22 22:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.