Download Jar. Libraryless. Click here for Pure Java version (11697L/65K).
!7 p { S s1 = "a", s2 = lower("A"); assertNotIdentical(s1, s2); // Now more clearly showing the improvement S a = internPerProgram(s1); S a2 = internPerProgram(s2); assertEquals("a", str(a)); assertEquals("a", str(a2)); assertIdentical(a, a2); S b = internPerProgram("b"); assertEquals("b", str(b)); print("OK"); }
Began life as a copy of #1011691
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gjtlkbvenryc, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011693 |
Snippet name: | Test internPerProgram (OK) |
Eternal ID of this version: | #1011693/3 |
Text MD5: | 3671611f6bc03fa6b09de0261194bc42 |
Transpilation MD5: | 5fa50c01a9cb6cd762f47aa1e6eba712 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-02 06:24:26 |
Source code size: | 348 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 520 / 1234 |
Version history: | 2 change(s) |
Referenced in: | -