Java – Print array elements

Last Updated:

Learn to print simple array and 2d array in Java. For nested arrays, the arrays inside array will also be traversed in this Java print array example.

Java Double Brace Initialization

Last Updated:

Java double brace initialization example. Learn what is double brace initialization, it’s performance and what each brace means?

Java Cloneable interface – Is it broken?

Last Updated:

Java Cloneable interface. Learn why Java Cloneable interface is broken by design. Learn how you should use copy constructors or factory methods to overcome.

Java XPath Example – XPath Tutorial

Last Updated:

Java XPath Example. XPath is a syntax used to describe parts of an XML document. In this tutorial, we will see some useful ways to apply xpath to extract information from an XML file.

Java Custom Exceptions – Best Practices

Last Updated:

We have been using handling java custom exceptions in our code for almost every industry standard application. Usual approach is to create some custom exception …

Java main() method

Last Updated:

Have you ever tried to reason why Java main method is public, static and void? Why it’s name is main? What happens inside JVM when …

How to create immutable class in Java

Last Updated:

Learn what is immutable class in Java. How to create a Java class immutable step by step. Also learn the benefits of immutable classes in real-life examples

Java String Interview Questions with Answers

Last Updated:

All of us must have gone though interview questions related to String class in java. These String interview questions range from immutability to memory leak issues.

Java FileChangedReloadingStrategy Example

Last Updated:

This article solves a very common problem of refresh .properties file on runtime on every file change using FileChangedReloadingStrategy, which is usually required in most …

OOPs – Encapsulation vs Abstraction

Last Updated:

In this tutorial, I will explain the encapsulation in java and its relation with abstraction. Also learn about information hiding and implementation hiding.

Interface vs. Abstract Class in Java

Last Updated:

Learn about java abstract classes vs interfaces in details. Also learn about when to use interface and when to use abstract class in solving design issues.

OOP – Abstraction

Last Updated:

In simple words, java abstraction captures only those details about an object that is relevant to the current perspective. Learn more about abstraction in java.

HowToDoInJava

A blog about Java and its related technologies, the best practices, algorithms, interview questions, scripting languages, and Python.