Hello,
I'm trying to make my array as compact as possible. since a calculation will not go above 60, i used byte data type, but the compiler says 'possible loss of precision' and then doesn't run the array. Here is the code fragment:
tarray=new byte[6][10]; for(byte y=0;y<6;y++){ for(byte x=0;x<10;x++){ tarray[y][x]=(y*10)+x; System.out.println("tilearray "+y+","+x+": "+tarray[y][x]); } }
The following very similar code has the same error, but outputs the value:
byte six=6; byte ten=10; byte mul=six*ten; System.out.println(mul);
So why doesn't my array output the information.