Tag Archives: Java

Java 21 – Java 21 features with example

By | March 3, 2024

The new version of Java, Java 21, is finally released on September 19, 2023, as the next long-term support (LTS) version. Because of this LTS version, it will be used in commercial support as the next stable version. After working on a total of 2585 JIRA issues, of which 1868 were resolved by Oracle and… Read More: Java 21 – Java 21 features with example »

How to resolve Eclipse version 1.8.0_301 of the JVM is not suitable for this product. Version 17 or greater is required. | Eclipse JVM is not suitable for this product

By | December 28, 2024

Whenever we install a new version of Eclipse IDE, which comes with the latest support for JVM, while opening Eclipse IDE, we may get the following error: Version 1.8.0_301 of the JVM is not suitable for this product. Version 17 or greater is required. Steps to resolve JVM version 17 or greater is required Step… Read More: How to resolve Eclipse version 1.8.0_301 of the JVM is… »

How System.out.println() works internally in Java

By | August 24, 2026

In Java, System.out.println() is a statement that is used to print the arguments passed to it to the standard output, typically a console window. System.out.println() works through three parts: System is a Java class, out is a static PrintStream field, and println() is a method of PrintStream that writes text followed by a line break… Read More: How System.out.println() works internally in Java »

Iterator design pattern in Java

By | June 18, 2025

Iterator design pattern is a Behavioral design pattern that provides a way to access the elements of a collection without exposing the underlying implementation of the collection. In other words, it gives a way to traverse the elements of the collection without exposing the internal implementation of the collection. In the above figure, we can… Read More: Iterator design pattern in Java »

Yoda condition | if(null == x) or if(x == null)?

By | November 10, 2024

Yoda Condition: Good or Bad The term Yoda condition refers to a standard programming practice that says we must reverse the typical order of a conditional statement in code. It is named after the Star Wars character Yoda, who speaks in a unique way, where he switches the order of subjects and verbs in his… Read More: Yoda condition | if(null == x) or if(x == null)? »

Observer design pattern in Java

By | June 18, 2025

The Observer design pattern is a Behavioral design pattern that defines a one-to-many dependency between objects so that when one object changes state, all its dependent objects (observers) are notified and updated automatically. This pattern is also known as the Publish-Subscribe pattern. Observer design pattern real world example Let’s understand the observer design pattern with… Read More: Observer design pattern in Java »

Prototype design pattern in Java

By | June 18, 2025

The prototype design pattern is a Creational design pattern that deals with object creation. The main idea behind the prototype design pattern is to create an object by copying an existing object, known as a prototype, instead of creating a new object from scratch. When to use Prototype design pattern? Example Let us understand the… Read More: Prototype design pattern in Java »

Builder design pattern in Java

By | June 18, 2025

The Builder design pattern is a creational design pattern that is used to create the objects (complex objects) step by step and then finally return the final object with the required attribute values. It allows us to create different types of objects using different attributes, depending on our requirements. Why to use Builder design pattern… Read More: Builder design pattern in Java »

Java Memory Management: Ultimate Guide for Performance and Optimization

By | August 25, 2023

Java Memory management in Java refers to the process of handling computer memory (RAM) effectively and efficiently to store and manage objects created during the execution of a Java program. It involves allocating memory to new objects when they are created and freeing up memory from objects that are no longer needed (garbage collection) to… Read More: Java Memory Management: Ultimate Guide for Performance and Optimization »

Factory design pattern in Java

By | August 30, 2023

Factory Design Pattern is a way of creating objects without directly specifying their exact class. Instead of creating objects using the new keyword, we hand over the object creation process to a separate factory class. This factory class is responsible for creating instances of different sub-classes or classes based on certain conditions. It helps us… Read More: Factory design pattern in Java »