Records – JEP 359

It's frequently that when writing our code, we end up writing "data" classes(POJO). Classes with several properties, getters and setters, equals, hash code, toString and nothing else. Of course, all the code can be generated by the IDE and more recently Lombok but they are still required and are one of the reasons for Java be … Continue reading Records – JEP 359

Helpful NullPointerExceptions

JDK 14 will have a new feature, JEP 358 - Helpful NullPointerExceptions. This feature aims to bring a better understanding to the developer about the cause of a Null Pointer Exception. Let's take a look at the code below: String name = student.getName(); The JVM would produce a message like: Exception in thread "main" java.lang.NullPointerException … Continue reading Helpful NullPointerExceptions