Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners can you explain ?

Have Programming Question? Ask it here!
 
 
 


soso ce
can you explain ?
0 Answer(s)      3 years and 6 months ago
Posted in : Java Beginners


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 "); 
             lead spaces = cal.get(Calendar.DAY _OF WEEK);
             int day of month = days[m];
             if (cal.isLeapYear(cal.get(Calendar.YEAR)) && m == 1){ day of month++;}
             for (int i = 0; i < lead_spaces; i++) { 
                 System.out.print("   "); 
                  } 
             for (int i = 1; i <= day of month; 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

Advertisement
View Answers

Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com