Java Switch Statement is now more Powerful Java 18

Java Switch Statement is now more Powerful | Java 18

Hey Tea Lovers! Today let me talk about the Plain Old Java Switch Expression, but with a twist. This twist or update has been added to the core library of Java since Java 13. And If you are using Java version 13 or after, you can surely convert that old switch with the new one. I will talk about how it offers certain features in it without breaking existing changes. Of course, the other language users may comment “It was already there in our programming language years ago”. But let’s just smile, and continue coding in Java, shall we? One note, I will be using the " switch expression" and " switch statement" interchangeably in the post, so keep it in mind that I am trying to say the same thing. ...

April 23, 2022 · 5 min · Imran Shaikh
Java 16 Record to Reduce Boilerplate Code of POJO

Java 16 Record to Reduce Boilerplate Code of POJO

Hey, Tea Lovers! Java 16 is released a few days back, well, a month to be precise. It introduced 17 new features. I discussed the 4 features that the developer will use a lot in my previous post, Simplified Java 16 Key Features. In this post, we will deep dive into Java 16 Record to see how it helps us to reduce the boilerplate code of POJO classes. POJO Boilerplate Code Whenever you need a simple class to hold the data, you write a POJO class, right? But Even though your need is simple, you need to write tonnes of code for just a few things. Such as getters and setters, constructors, toString, and equals and hashcode. No matter how many different POJOs you write, you have to write these 90% similar methods. These things with little to no changes that we have to write again and again for simple purposes are known as Boilerplate code. ...

May 1, 2021 · 9 min · Imran Shaikh
Java 16 is Here and Key Takeaways for Java Developers

Java 16 is Here! New Features of Java 16 Simplified

Hey, Tea Lovers! Today I will briefly talk about the latest release of Java 16 on March 16, 2021. I will talk about the key takeaway from the features and improvements, which I think will affect the day-to-day life of a Java developer. This post is heavily based on the press release “Oracle Announces Java 16”. If you want to see it in more detail, you can check out the press release here. ...

April 4, 2021 · 6 min · Imran Shaikh