Problem with an array (Array index out of bounds)

Hey guys, i have a problem with an array, i just want to print a few things but it won't let me because of this error, here's my code

public static void MosDat()

{

int i;

for(i=0 ; i<n ; i++);

{

Client [ i ].print1();

Client [ i ].print2();

}

return;

}//MosDat

where "n" is a global variable, and client is .

I pretty much know how it woks, so i tried it like this and gave "n" the value of"1":

public static void MosDat()

{

int i;

for(i=0 ; i><n ; i++);

{

Client [ 0 ].print1();

Client [ 0 ].print2();

}

return;

}//MosDat

the printing methods i created worked prefectly when i tried it like that... so i really don't know where the problem could be... thanks anyone who can help me.>

[845 byte] By [Kornikle290a] at [2007-11-27 8:20:55]
# 1
Why not use this?for(int i=0; i<Client.length; i++)>
CaptainMorgan08a at 2007-7-12 20:09:20 > top of Java-index,Java Essentials,Java Programming...
# 2
> for(i=0 ; i < n ; i++);I spy with my little eye,one semicolon too many.
Hippolytea at 2007-7-12 20:09:20 > top of Java-index,Java Essentials,Java Programming...
# 3
> > for(i=0 ; i < n ; i++);> > I spy with my little eye,> one semicolon too many.Well-spotted. ;-)
CaptainMorgan08a at 2007-7-12 20:09:20 > top of Java-index,Java Essentials,Java Programming...
# 4
sure you typed the code right? says "cannot find the symbol. Variable Client"... and Client is a global declared array
Kornikle290a at 2007-7-12 20:09:20 > top of Java-index,Java Essentials,Java Programming...
# 5
> > > for(i=0 ; i < n ; i++);> > > > I spy with my little eye,> > one semicolon too many.> > Well-spotted. ;-)Practicing on those weird question marks is my secret training.
Hippolytea at 2007-7-12 20:09:20 > top of Java-index,Java Essentials,Java Programming...
# 6
OMGGGGGGGGGG yah that's right thanks buddy
Kornikle290a at 2007-7-12 20:09:20 > top of Java-index,Java Essentials,Java Programming...
# 7
> sure you typed the code right? says "cannot find> the symbol. Variable Client"... and Client is a> global declared arrayComrade, it's your code! We're counting on you to get the invisible parts right!
Hippolytea at 2007-7-12 20:09:20 > top of Java-index,Java Essentials,Java Programming...
# 8
no way it was a semi colon.... can't believe it lol......
Kornikle290a at 2007-7-12 20:09:20 > top of Java-index,Java Essentials,Java Programming...