Java Sealed Class -1

Java Sealed Classes: The Ultimate Guide to Secure Code

Hey Tea Lovers! We meet after a long time. Today’s post will be a short and cut-to-the-point post about the latest offering (relatively) by Java 17+. Yes, as you read in the title, it is about sealed classes in java. We will go over some of the basics and will give you some pointers that I think fully describes it. So let’s get to it. Introduction of Java’s Sealed Class The sealed class in Java is a new addition to the core library of java since Java 17. It is an introduction to the new keywords, sealed and non-sealed. The sealed class allows one to describe which class/interface can extend/implement the current class/interface. I will be using class throughout the post but it applies to both classes and interfaces in Java. ...

February 15, 2023 Â· 5 min Â· Imran Shaikh
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
What's new in Java 18 The Latest Java

What's new in Java 18? New Features of New Java 18

Hey Tea Lovers. On 22 March 2022, JDK 18 or Java 18 is released to the public (from Oracle). Java 18 does not contain any major updates that will change how we code, but it does have something very interesting. Few of the updates are in the incubator or preview mode. So for this article, I will be mostly focused on the core library addition. Don’t worry I will add a summary of other updates as well. ...

March 26, 2022 Â· 5 min Â· Imran Shaikh
Java 17 These 5 New Features Makes Java 17 Special

Java 17: These 5 New Features Make Java 17 Special

Hey, Tea Lovers! Java 17 is about to release in September 2021, so I thought now would be a great time to give you some updates on what is there in Java 17. I list down some key points about Java 17, that makes it special. This list is generated based on what I think will affect me on my project if I use Java 17. There are other features as well which are great and required for the enhancement of Java. I list them down at the end of the post to read them in more detail. Now let’s look at the features, shall we? ...

August 29, 2021 Â· 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
Things to love in Java 11

The Things I Love and Use from Java 11

Hey, tea lovers! Since its inception, Java is dying. It is now 25 years old and it is dying. After 10 years again, people will say Java is dying. Well, it is something I and every Java developer are fed up with hearing. Let us keep ignoring it and focus on what Java is providing to keep up with the latest trend or requirements. I will be going over the things I think have improved the productivity of the developer since Java 11. We will talk about Java 11 only since it is LTS (Long Term Support) version and many people are using this only until the next LTS. Make your tea sip and code with Java 11. ...

August 22, 2020 Â· 5 min Â· Imran Shaikh
Install Latest or Any Java Version in 3 Simple Steps: Windows

Install Latest or Any Java Version in 3 Simple Steps: Windows

Hey! Tea lovers. Let us talk about the first baby step we take into the Java world. And that’s the installation of Java Development Kit aka JDK. There are only 3 steps to set up JDK, without the installer. You can have multiple versions of JDK at the same time and switch between them very easily. Prepare your tea and let us see those 3 magical steps. TL;DR This post discusses the installation of JDK on the Windows system. We will be discussing other operating systems such as Ubuntu and Centos. The JDK I am utilizing for the aforementioned post is OpenJDK 13. We have JDK 14 as well but it’s an early release and might have bugs. So we won’t be using that. ...

May 15, 2020 Â· 4 min Â· Imran Shaikh