8.10: Netbeans
Hello
I asked this question already in the Netbeans forum, but unfortunately I haven't been getting an answer. I've the following Java code:
int[] anArray = {37, 23, 11, 87, 63, 55, 17, 1, 46, 88};
int temp1;
int temp2;
for (int x1 = 0; x1 < 11; x1++) {
for (int x2 = 1; x2 < 11; x2++) {
temp1 = anArray[x1]:
temp2 = anArray[x2]:
}
If I run it, I always get the following error message:
run:
Exception in thread "main" java.lang.
at x.Main.
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
If I click "Main.java:29", the cursor will be placed in the line "temp2 = anArray[x2]:".
Can you tell me why I get this error? And what can I do to prevent it? Thanks.
Peter
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- peter
- Solved:
- Last query:
- Last reply: