GregorianCalendar cal = new GregorianCalendar(year, month, 1);
nod = cal.getActualMaximum(GregorianCalendar.DAY_OF_MONTH);
som = cal.get(GregorianCalendar.DAY_OF_WEEK);
for (int i=1; i<=nod; i++){// plz explain this line
int row = new Integer((i+som-2)/7); // plz explain this line.
int column = (i+som-2)%7;// also this line.
mtblCalendar.setValueAt(i, row, column);
ali11
-1
Light Poster
Recommended Answers
Jump to PostWhere did you get this code? By just randomly copying code you've found on the net, you won't be learning coding yourself.
for (int i=1; i<=nod; i++){
This is the opening of an iteration, a for loop.
The following block will execute while i is equal to or lesser than …
All 2 Replies
stultuske
1,116
Posting Maven
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.