HelloWorld.java 697 B

1234567891011121314151617181920212223242526272829303132
  1. package misc;
  2. import java.math.BigInteger;
  3. import util.Util;
  4. public class HelloWorld {
  5. public static void main(String[] args) {
  6. System.out.println("HelloWorld!");
  7. byte[] tmp = new byte[3];
  8. BigInteger bi = new BigInteger(1, tmp);
  9. System.out.println(bi.toByteArray().length);
  10. // System.out.println(tmp[3]);
  11. // System.out.println(Arrays.copyOfRange(tmp, 2, 1).length);
  12. byte[] a = new byte[] { 0 };
  13. byte[] b = a.clone();
  14. a[0] = 1;
  15. System.out.println(a[0] + " " + b[0]);
  16. // throw new ArrayIndexOutOfBoundsException("" + 11);
  17. System.out.println((new long[3])[0]);
  18. byte[] negInt = Util.intToBytes(-3);
  19. System.out.println(new BigInteger(negInt).intValue());
  20. }
  21. }