
my dear can you teel me the explaintion for this code i need it
GregorianCalendar cal = new GregorianCalendar(y, m, 0);
System.out.println("Su Mo Tu We Th Fr Sa ");
leadspaces = cal.get(Calendar.DAY _OFWEEK);
int dayofmonth = days[m];
if (cal.isLeapYear(cal.get(Calendar.YEAR)) && m == 1){ dayofmonth++;}
for (int i = 0; i < lead_spaces; i++) {
System.out.print(" ");
}
for (int i = 1; i <= dayofmonth; i++) {
if (i < 10) System.out.print(" ");
System.out.print(i);
if ((lead_spaces + i) % 7 == 0) {
System.out.println();
}
else {
System.out.print(" ");
} }
System.out.println(); } }
iam explain whole code exept this part
can you help
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.