Introduction We 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…

Posted in Java

Understanding Java Class Loaders

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…

Posted in Java

Exception vs Error in Java

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

Posted in Java

Can We Override Static Method 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.

Posted in Java

What is Class.forName() in Java

The purpose of garbage collection in Java is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused later.

Posted in Java

What is the purpose of garbage collection in Java?

Local class or classes in Java are defined in a block, which is a group of zero or more statements between balanced braces. We typically find local classes defined in the body of a method. We can define a local class in Java inside any block. In this example we will create a local class…

Posted in Java

Local Class in Java

We will discuss about static import in Java. The static import construct allows unqualified access to static members without inheriting from the type containing the static members. Instead, the program imports the members, either individually: or all at once from a particular package.

Posted in Java

What is static import in Java?

I will tell you here what is wrapper class in Java. The primitive data types are not objects; so they do not belong to any class; they are defined in the language itself. Sometimes, it is required to convert data type into an object in Java language. For example, up to JDK 1.4, the data…

Posted in Java

Wrapper Class in Java

Introduction In this post I will tell you the number of improvements made to HashMap in Java 8 or later version. In other words I am going to discuss what are the improvements made to HashMap in Java 8.

Posted in Java

Improvements to HashMap in Java 8

We will discuss about strictfp keyword in Java. strictfp is a keyword in the Java programming language that restricts floating-point calculations to ensure portability. The strictfp was introduced into Java with the Java virtual machine (JVM) version 1.2 and is available for use on all currently updated Java VMs.

Posted in Java

What is strictfp keyword in Java?

Introduction We will discuss here why PermGen space was removed from Java 8. If you specify the JVM arguments PermSize and MaxPermSize then these arguments are ignored by Java HotSpot and JVM issues warnings. The warning may look like “Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0”. PermGen Space…

Posted in Java

Why PermGen Space was removed from Java 8

Introduction I will discuss here what is Optional.get() in Java. Optional is a class and get() is a method in this class. Java 8 was a huge improvement to the platform and one of the new features was added Optional.get(). So using this feature you are telling that a value may or may not be…

Posted in Java

What is Optional.get() in Java?