Syntax error when returning an array
Hi,
I'm totally new to Java. I try to return an array of two strings. Somehow, I can't return the array value. In the suggestion box from java, it suggests that I create a local array value (I already defined this array value in the for loop). Please help me point out the error in my code.
Thx in advance.
P.V.
public String[] AccInformaion(int CustomerAccNumber)
{
String[] name = {"X","Y","Z"};
double[] balance = {1500,10000,10};
int[] AccNumber = {123,456,789};
for(int i = 0; i <= (AccNumber.length -1);i++)
{
if (CustomerAccNumber == AccNumber[i])
{
String customerBalance_S = Double.toString(balance[i]);
String[] value = {name[i],customerBalance_S};
}
else
{
...
}
}
return value;
}