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

Asked 2 years ago, Updated 2 years ago, 81 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.