A byte array of size 256 is filled with integers 0 to 255. All values in the byte array are added to produce a sum:
byte[] bytes = new byte[256];
// fill the array from 0 to 255
for(int i=0; i < bytes.length; ++i)
bytes[i] = (byte)i;
// calculate sum of all
int sum = 0;
for(byte b : bytes)
sum += b;
What will be the value of sum?