PDA

View Full Version : Incompatible types (java)



SpyroViper
April 27th, 2009, 03:49 PM
Hey guys,

I think this is me being dumb again lol. BUt I can't for the life of me figure out why I'm getting an incompatible types error on this line:


{
int i = 0;
while (i< authoreId. length)
return System.out.print (i);

}

The rest of my code is fine, it's just this line.

Thanks guys! :guitar:

kpkeerthi
April 27th, 2009, 03:53 PM
You are returning System.out.print(i), the type of which is void.

SpyroViper
April 27th, 2009, 04:08 PM
Ahh,

Thank you! Me being dumb agan lol!