3 ms·
No java doesn't use 64bits at all. It uses unsigned right shift. I mentioned it in another post: "int mid = (low + high) >>> 1;"... And for the older timers (14
by xxs 6y ago
No java doesn't use 64bits at all. It uses unsigned right shift. I mentioned it in another post: "int mid = (low + high) >>> 1;"... And for the older timers (14y ago), there used to be a bug[0] about exactly that.
[0] https://bugs.openjdk.java.net/browse/JDK-5045582 https://bugs.openjdk.java.net/browse/JDK-5045582