The tricky thing about working with PriorityQueues is that, ironically, they don’t always behave according to the PriorityQueue semantics.
1 CommentCategory: Dev
In this short article, we’ll have a look at how we can bypass Kotlin’s native null-safety with sun.misc.Unsafe, and see why it can be dangerous even if we aren’t messing up with it directly.
2 CommentsThe peek() method from the Java Stream API is often misunderstood. Let’s try to clarify how it works and when should be used.
Stream<T> peek(Consumer<? super T> action)4 Comments