Tag: Java FAQs
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…
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…
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…
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.
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…
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.
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…
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…