// 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 DeHex {
   public static void main(String[] args) {
      System.out.println(Long.decode("0xFF").byteValue());
      System.out.println(Long.decode("0xFFFF").shortValue());
      System.out.println((Long.decode("0xFFFFFF").intValue() << 8) >> 8);
      System.out.println(Long.decode("0xFFFFFFFF").intValue());
   }
}
