📄 internhog.java
字号:
public class InternHog { public static final int MAX_NUM = 100000; public static void main(String[] args) { int x = 0; try { if ((Integer.toString(0) + "aa").intern() != "0aa") throw new Exception("intern inequality"); while (x < MAX_NUM) Integer.toString(x++).intern(); System.out.println("Success."); } catch (Throwable t) { System.out.println("Failed at " + x + ": " + t); t.printStackTrace(System.out); } }}/* Expected Output:Success.*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -