Interview Question: Final vs Finally vs Finalize

Interview Question: Final vs Finally vs Finalize

Hey, Tea Lovers! Today let’s look at the most asked, tricky, and fumbled interview question i.e. What is the difference between final, finally, and finalize in Java? Most beginners face this question. The thing is, only their names are the same the work is completely unrelated. I know you are in a hurry to prepare for the interview, so I will make this post as short as possible. But before reading, prepare your cup of tea to sip and code. ...

October 14, 2020 · 6 min · Imran Shaikh
You Must have these IntelliJ IDEA Plugins

Every Programmer Needs these IntelliJ IDEA Plugins

Hey, Tea Lovers! Today we will talk about the top IntelliJ IDEA plugins every programmer should have. These IntelliJ plugins help us, programmers, to be more productive and make our life easy. This post is one of the series on Plugins or Extensions every Programmer needs for their IDE. We already discussed these for Eclipse IDE and VSCode. Please check them out. A few of the plugins are for some fun and some are dependent on what you do. This post is an addition to our post series to improve your productivity through IDEs. We already have written posts like, " You Only Need These 7 IntelliJ IDEA Shortcuts to Skyrocket Your Productivity" and " Eclipse IDE Shortcuts to Skyrocket Your Productivity". We will be uploading the must-have plugins for Eclipse. ...

October 3, 2020 · 5 min · Imran Shaikh
Communicate-over-SSL-in-Java_7edacef98657aa8a7e08fb16543c0986

How to Add SSL or TLS Certificate in Java

Hey, Tea Lovers! Today we are going to set up the SSL or TLS certificate for securing our communication with another server. If your Java code is trying to connect to DB over SSL\TLS or calling an HTTPS API then you will be needing that server’s root certificate. We will add SSL or TLS Certificate in Java. To add a certificate via a keytool you have the following options. Insert in Java’s Truststore or Create your own Truststore if don’t have permission. Why Insert SSL certificate in Java When communicating over SSL or TLS Java authenticates the host. If you don’t tell Java that I trust this host then it will throw the following error. ...

September 15, 2020 · 4 min · Imran Shaikh
Basic to Advance ways to iterate over a List in Java (1)

Basic to Advance ways to iterate over a List in Java

Hey, Tea Lovers! Collection Framework is a very powerful library in Java. Every update in Java adds some more interesting features to this. Today, we will go over how you can iterate over a List, be it ArrayList, LinkedList, or any other. We will take a look at them in ascending order from the basic loop to iteration to Stream API. And also, figure out which one is best suitable for our requirements. So, make your tea and get ready to sip and code. ...

August 27, 2020 · 5 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
Be more Functional with Java's Functional Interfaces

Monitor Your Java Memory with these Tools

Hey Tea lovers! Today, we will talk about Java memory monitoring tools. You will need them when you want to see how well or worst your code is performing, or if you don’t know what’s going on in there. I have added not only the information about them but also videos showing how to use them in brief. It is the continuation of the post series This is the continuation of the post series “Get Ready to Deep Dive Java Memory Management”. ...

July 3, 2020 · 4 min · Imran Shaikh
Reduce NullPointerException with Optional in Java 8 & Beyond

Reduce NullPointerExceptions with Optional in Java

Hey, Tea Lovers! Today we will talk about the Optional class in Java 8. But before that, Did you know that Tony Hoare, The inventor of the null reference, has said that the null reference is his “Billion Dollar Mistake”? Since NullPointerException is the most common and frequently appeared error compared to others, especially for Java developers. I have seen people wrapping each code block in a try-catch to handle this sneaky fool. That’s how much we are scared of this exception. ...

June 23, 2020 · 7 min · Imran Shaikh
Say Good-Bye to Boilerplate Code with Lombok (1)

Say Good-Bye to Boilerplate Code with Lombok: Part 2-The Code

Hey! Tea Lovers! We will discuss How to use Lombok in our code. It’s the continuation of our previous post " Say Good-Bye to Boilerplate Code with Lombok: Part 1-Installation". In which we looked at what Lombok is and how to install it in Eclipse or IntelliJ IDEA. Now, we will look at how we can use the Lombok library in our code. How to Use Lombok To use Lombok please be ready with the installation and dependencies which we discussed in the previous part. ...

June 19, 2020 · 6 min · Imran Shaikh
Project Lombok (1)

Say Good-Bye to Boilerplate Code with Lombok: Part 1-Installation

Hey! Tea lovers! Before talking about Lombok, what are the things that irritate us Java Developers the most? Well yes, hearing “Java is dying” from a Python developer is irritating but it is the second thing. The first one is the boilerplate code. We write it almost every time. Setters and getters, constructors, toString, and many others for simple POJO classes. Of course, IDE can generate this code for you but again, your simple POJO class then becomes redundant. And the only things that matter in the POJO are the fields, so why not write fields only and let the compiler handles the rest of the things? And that’s where Project Lombok comes into the picture. ...

June 19, 2020 · 4 min · Imran Shaikh
A Quick Glance at Sorting Algorithms Code in Java

A Quick Glance at Sorting Algorithms Code in Java

Hey! tea lover! This post is not a tutorial, just code samples of different sorting algorithms you can see before going to the interview. I have written the algorithms in Java. There is little to no explanation, just pure simple code for you to quickly glance through it. The purpose of making this is to put all the sorting algorithms Java code in one place only. You can see the whole Data Structure and Algorithms project on GitHub. ...

June 7, 2020 · 6 min · Imran Shaikh