Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • \$\begingroup\$ How does it work? \$\endgroup\$ Commented May 23, 2015 at 13:02
  • 1
    \$\begingroup\$ @Loovjo: Similar as other solutions which cut the code in two parts and inserts the whole String which reprensents the code inside again, but the whole code is not just a String but encoded as the long number in base 36 (26 alphabetical characters + 10 digits). \$\endgroup\$ Commented May 24, 2015 at 9:38
  • 1
    \$\begingroup\$ This could be shortened if you put if(++i==92), \$\endgroup\$ Commented Jun 12, 2017 at 14:00
  • 2
    \$\begingroup\$ @tuskiomi: Thanks, shortened for two characters \$\endgroup\$ Commented Jun 12, 2017 at 14:20
  • 1
    \$\begingroup\$ @userunknown Actually, a* as array doesn't exit in Java, that's C. Some other parts to golf: import java.math.*;class a{public static void main(String[]a){BigInteger b=new BigInteger("abc",36);int i=0;for(int c:b.toByteArray())System.out.printf("%s%c",++i==92?b.toString(36):"",c);}}, where abc would be the newly computed magic number String. In java 8+ it's also possible to change class a{public static void main to interface a{static void main, and in Java 10+ it's also possible to change import java.math.*; and BigInteger b=new BigInteger( to var b=new java.math.BigInteger(. \$\endgroup\$ Commented Mar 23, 2018 at 13:57