// 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 IntLong {
   public static void main(String[] args) {
      int i;
      long l;
      i = 0x12345678;
      l = 0x12345678;
      System.out.println(Integer.toHexString((i << 5) >> 5));
      System.out.println(Long.toHexString((l << 5) >> 5));
      i = 0x87654321;
      l = 0x87654321;
      System.out.println(Integer.toHexString((i << 5) >> 5));
      System.out.println(Long.toHexString((l << 5) >> 5));
   }
}
