Hi all, please find your Java newsletter below. The Java Insights newsletter is coming on Sunday, as always. 🚀

🔥 Top Java Posts

Java Language Futures

A tour of recent and future changes in the Java Programming Language. Checkout the features you’ll be using soon. Learn more >>

Project Loom: Java Virtual Threads

A close look at Project Loom, which proposes virtual threads for the Java Programming Language. Project Loom is under preview and is documented in JEP 425. Learn more >>

🖱️ Just Click It

  1. Quarkus Dev Services, jOOQ, Flyway, and Testcontainers: A Full Example
  2. CVE-2022-21449: Psychic Signatures in Java
  3. Does Java 18 Finally Have A Better Alternative To JNI?
  4. Java on Visual Studio Code Update – April 2022

🤖 Java Interview Questions

  1. In which situation would you use a LinkedList instead of an ArrayList?
    • A common situation would be when add operations are common and the size of the list is not known ahead of time and read operations are not common. Add operations are cheaper in LinkedList compared to ArrayList. One factor is that when an ArrayList reaches its capacity, it needs to be resized by being copied into a new array. On the other hand, using a LinkedList tends to consume more memory and you can’t access elements in O(1) if the element is not in the head.
  2. You need to create a HashMap to store a large pre-defined amount of mappings. How can you improve the chances of mappings in that HashMap to be stored more efficiently?
    • One way to increase the chances of store mappings more efficiently is to create the HashMap instance with sufficiently large capacity instead of relying on the automatic rehashing to grow the table. Learn more

❓StackOverflow Java Question

  1. How can I generate a list or array of sequential integers in Java?

⚙️ New Releases

Previous Editions