Answers for "How to get the current year,day,month in java"

4

java get current year

import java.util.Calendar;

int year = Calendar.getInstance().get(Calendar.YEAR);
Posted by: Guest on November-06-2020
2

get day from date month year java

Calendar cal = Calendar.getInstance();
cal.set(year,month-1,day);
int nd = cal.get(Calendar.DAY_OF_WEEK);
Posted by: Guest on May-18-2021

Code answers related to "How to get the current year,day,month in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language