"variable arrayB & arrayA has not been initialized" how can i fix this? here's m |
| |
|
|
|
New Poster Posts: 5 Topics: 3
|
|
|
August 17, 2010, 05:02:16 AM
|
|
Help me i have an error in my java code
import java. util. Scanner; //bubble sorting
public class Project { public static void main(String args[]) {
int n; int u; boolean Execute = true; int bub = 0; int i = 0; int x = 1; int evenctr, oddctr;
______________________ Income Protection Insurance| Life Insurance Quotes
|
|
| |
|
|
|
Code Guru Gender:  Posts: 1399 Topics: 85
|
|
|
August 19, 2010, 11:39:08 AM
|
|
I don't see any variable of that name in your code snippet, let alone a variable. If you initalise them inside a conditional (or try/catch) you will get this, initialise them to null initially.
|
|
| |
|
|
|
New Poster Posts: 7 Topics: 1
|
|
|
September 09, 2010, 04:40:49 AM
|
|
I don't see variables arrayB and arrayA in ur code. here are examples of declaring and initialing arrays example : int [] a = { 1,2,3} int [] a = new int [2] a[0]= 1
|
|
| |