// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class IntByteInt {
   public static void main(String[] args) {
      int a[] = new int[256];
      for(int i = 0; i < a.length; i++) {
         a[i] = i;
      }
      byte[] b = new byte[256];
      for(int i = 0; i < b.length; i++) {
         b[i] = (byte)a[i];
      }
      int[] c = new int[256];
      for(int i = 0; i < b.length; i++) {
         c[i] = 0xFF & b[i];
      }
      for(int i = 0; i < a.length; i++) {
         if(a[i] != c[i]) {
            System.out.println(i + " : " + a[i] + " -> " + c[i]);
         }
      }
   }
}
