fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.io.File;
  4. import java.io.FileInputStream;
  5. import java.io.FileNotFoundException;
  6. import java.io.IOException;
  7. import java.math.BigInteger;
  8. import java.net.*;
  9. import java.util.*;
  10. import java.util.zip.CRC32;
  11. import java.nio.*;
  12.  
  13. /* Name of the class has to be "Main" only if the class is public. */
  14. class Ideone
  15. {
  16. public static void main (String[] args) throws java.lang.Exception
  17. {
  18. // your code goes here
  19. //ByteBuffer bb = ByteBuffer.allocate(1).putLong(1);
  20. //bb.compact();
  21. //byte[] rb = {3,4};//bb.array();
  22. // CRC32 c = new CRC32();
  23. //c.update(rb);
  24. System.out.println(0b1100111<<8|0b10100000);
  25. byte abyte = -88;
  26. int i2 = abyte & 0xFF;
  27. System.out.println(Integer.toBinaryString(i2));
  28. System.out.println(String.format("%010d", -234));
  29. System.out.println(Integer.parseInt("-000000234"));
  30. String bi = "10";
  31. byte[] rb = bi.getBytes("UTF-8");
  32. //System.out.println("Crc32:"+c.getValue());
  33. for(int i=0; i<rb.length; i++) {
  34. System.out.println(((char)((byte)49))+""+((char)50));
  35. }
  36.  
  37. int i;
  38.  
  39. }
  40. }
Success #stdin #stdout 0.06s 380224KB
stdin
Standard input is empty
stdout
26528
10101000
-000000234
-234
12
12