Can someone tell me what's wrong with my program?
import java.util.Scanner;
public class TotalSales
{
public void getNumbers()
{
Scanner input = new Scanner( System.in );
double numbers[][] = new double[5][5];
int count = 0; // number of uniques read
int x = 0;
int y = 0;
int productNum = 1;
int salesPerson = 1;
for(int j = 0; 0 < 4; j++)
{
for(int i = 0; 0 < 5; i++)
{
System.out.printf("Enter the total sales of product %d from salesperson %d", productNum, salesPerson);
numbers[y][x] = input.nextDouble();
y++;
productNum++;
}// end for
salesPerson++;
y = 0;
x++;
}// end for
}
}
Whenever I try to compile it, it gives me an error message saying "salesPerson++" is an unreachable statement. If I switch "salesPerson++" with "y = 0;" it will say "y = 0;" is an unreachable statement. So we can conclude that is has to do with the first line after the for loop.