Download Jar. Libraryless. Click here for Pure Java version (862L/6K).
1 | !7 |
2 | |
3 | sclass A { |
4 | S a; |
5 | } |
6 | |
7 | p { |
8 | Field f = A.class.getDeclaredFields()[0]; |
9 | print(f + " " + identityHashCode(f)); |
10 | |
11 | Field f2 = A.class.getDeclaredFields()[0]; |
12 | print(f2 + " " + identityHashCode(f2)); |
13 | |
14 | print(f == f2); |
15 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011907 |
Snippet name: | Test if Field objects are reused (they're not) |
Eternal ID of this version: | #1011907/2 |
Text MD5: | 97d2d22e5d18b19bbc772f1def306155 |
Transpilation MD5: | 2c2130d91f9c033be5b7b27ea2f79203 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-09 23:43:16 |
Source code size: | 241 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 502 / 1068 |
Version history: | 1 change(s) |
Referenced in: | [show references] |