Java obter o ano atual
import java.util.Calendar;
int year = Calendar.getInstance().get(Calendar.YEAR);
garzj
import java.util.Calendar;
int year = Calendar.getInstance().get(Calendar.YEAR);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = format.parse(datetime);
SimpleDateFormat df = new SimpleDateFormat("yyyy");
year = df.format(date);
import java.time.ZoneId;
import java.util.Date;
new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate().getYear();
int year = Calendar.getInstance().get(Calendar.YEAR);