8.10: Netbeans
Hi
I thought the problem has been solved but I was mistaken (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 temp;
int temp1;
int temp2;
for (int x1 = 0; x1 < anArray.length; x1++) {
for (int x2 = 1; x2 < anArray.length; x2++) {
temp1 = anArray[x1]:
emp2 = anArray[x2]:
if temp1 > temp2
}
}
If I run it, I always get the following error message:
run:
Exception in thread "main" java.lang.
at cobolsortapp.
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
If I click "Main.java:36", the cursor will be placed in the line "anArray[x2] = temp".
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: