Results 1 to 4 of 4
Thread: Please make me to understand
- 01-15-2013, 09:37 AM #1
Member
- Join Date
- Jan 2013
- Posts
- 2
- Rep Power
- 0
Please make me to understand
Here is the simple program, but I cant understand the execution. Please help me.
class TwoDArray {
public static void main(String args[]) {
int twoD[][]= new int[4][5];
int i, j, k = 0;
for(i=0; i<4; i++)
for(j=0; j<5; j++) {
twoD[i][j] = k;
k++;
}
for(i=0; i<4; i++) {
for(j=0; j<5; j++)
System.out.print(twoD[i][j] + " ");
System.out.println();
}
}
}
Please give me the output and explain the steps... Thanks in advance
(Sorry for my English, English is not my native language)
- 01-15-2013, 10:14 AM #2
Re: Please make me to understand
Please go through the Forum Rules, particularly tyhe third paragraph. Also go through the Guide For New Members and BB Code List - Java Programming Forum - Learn Java Programming and edit your post accordingly.
To change the subject line, click 'Edit Post' and then 'Go Advanced'
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-15-2013, 10:17 AM #3
Re: Please make me to understand
You can learn Java here: The Java™ Tutorials
Once you've made adequate progress, tell us what you think are the steps of execution. If you have anything wrong, someone will helpfully point that out.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-15-2013, 10:35 AM #4
Member
- Join Date
- Jan 2013
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
can i make a program to make keyboard and mouse idle or not responding for 10 second
By 3ammary in forum Advanced JavaReplies: 4Last Post: 07-23-2011, 08:08 PM -
Need to Understand code to make window centralized
By vicky15 in forum New To JavaReplies: 3Last Post: 05-14-2011, 12:49 PM -
GUI help. Don t understand
By s0meb0dy in forum AWT / SwingReplies: 2Last Post: 10-27-2010, 09:40 PM -
Trying to understand
By ladykrimson in forum New To JavaReplies: 20Last Post: 10-12-2010, 11:10 PM -
I don´t understand
By Manikyr in forum New To JavaReplies: 6Last Post: 02-22-2009, 11:22 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks