Es soll ein Koordinatensystem realisiert werden, nun das ist aber nicht das Problem. In der For-Schleife habe ich ein If-Statement und obwohl die Bedingung erfüllt wird, wird diese nicht ausgeführt. Weiß jemand warum?
Java:
public class Coo
{
final static int Y=25;
final static int X=10;
public static void main(String [] args)
{
int y=1;
char[][] coosystem=new char[Y][X];
for(int county=0;county<Y;county++)
{
for(int countx=0;countx<X;countx++)
{
coosystem[county][countx]=' ';
coosystem[county][1]='|';
coosystem[0][1]='^';
if(county==y)
{
coosystem[county][1]='+';
y=y+5;
}
System.out.print(coosystem[county][countx]);
}
System.out.println();
}
}
}