4 ms·
Java code if (obj instanceof java.lang.Object)
by kschua 14y ago
Java code
if (obj instanceof java.lang.Object)
- _yields 14y agoha! this is gold
- eduardordm 14y agoFirst, your answer is why I almost never criticize people's code: This is (was in Sun's time) an actual possible certification question and you are wrong, this CAN return false: Object obj = new Object() {{ System.out.println(false); System.exit(0); }}; System.out.println(obj instanceof Object);