fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. final Random r = new Random();
  13. long value = r.nextLong() & 0x3FFFFFFFFFFFFL;
  14.  
  15. value |= 1L << 50;
  16.  
  17. String stringValue = Long.toBinaryString(value).substring(1);
  18. System.out.println(stringValue);
  19. }
  20. }
Success #stdin #stdout 0.09s 320576KB
stdin
Standard input is empty
stdout
01011001011010000011100110001000101010100100101000