SAX – Simple API for XML

Introduction SAX – Simple API for XML, allows you to process a document as it is being read, which avoids the need to wait for all of it to be stored before taking action. So it takes less memory to process an XML document, whereas DOM (Document Object Model) parser first stores the whole document into memory before taking action….

DOM – Document Object Model

What is DOM ? A DOM – Document Object Model is a collection of nodes, or pieces of information, organized in a hierarchy. This hierarchy allows a developer to navigate around the tree looking for specific information. Analyzing the structure normally requires the entire document to be loaded and the hierarchy to be built before any work is done. Because…

How To Remove Case Sensitive From Auto Complete Search In IntellijIDEA

IntellijIDEA I will discuss here how to make auto complete search case insensitive or remove case sensitive from auto complete search in IntellijIDEA. Case sensitivity makes you irritating when you are typing something partially to get complete answer for it. Because either you have to type in small letters or capital letters. But end users should not be bother about…

Understanding Singleton Instance across JVM, Server and Clustered Environments

Introduction I will discuss here how singleton instance works across JVM, server (for example, Tomcat, WebSphere) and clustered environments. The acronym JVM stands for Java Virtual Machine. Singleton instance generally created from singleton design pattern. The purpose of the singleton design pattern is to create a single instance from a class per application per JVM. So there is only one…

Understanding Java Class Loaders

Java Class Loaders You will see here what are the Java class loaders with simple example. Java publicly released in the year of 1995 with a web browser with the ability to automatically and dynamically download applets whenever it encounters <Applet> tag in the HTML document. Such Applets are loaded on the fly across the network from remote web servers…

Setting Print Area for Excel Sheet using Apache POI in Java

Introduction In this post we will see how to set print area for excel sheet using apache poi in Java. There may be many number of columns and rows in your excel sheet but you need only few columns and rows to be printed in paper instead of all columns and rows from the sheet then you need to set…

Fit Excel Sheet to One Page using Apache POI in Java

Introduction We will create an example where we fit excel sheet to one page using Apache POI in Java. Apache POI is a wonderful library for manipulating data into office documents, such as, excel, ppt, word etc. We will fit excel sheet to one page for the existing excel files – an excel file that contains only text as well…

Exception vs Error in Java

I will tell you here what are the differences between Exception and Error in Java. There are mainly three important categories of Throwable: Error – something severe enough has gone wrong the most applications should crash rather than try to handle the problem. Unchecked Exception (also known as, RuntimeException) – mainly a programming error, such as, a NullPointerException or an…

Can We Override Static Method in Java?

We will discuss here whether we can override static method in Java or not.

What is Class.forName() in Java

The Class.forName() in Java or java.lang.Class.forName(String className) method returns the Class object associated with the class or interface with the given string name.