Java does not allow creation of array with generics as elements. ..
ListIterator can iterate in the both directions of a Collection. It maintains two pointer for previous and next element...
WeakHashMap is a class similar to IdentityHashMap. Internally, it is represented by a Hashtable...
Inversion of Control (IOC) principle is the base of Spring framework. It supports dependency injection in an application...
If we suspect that our application is stuck due to a Deadlock, then we just take a thread dump by using the command specific...
The Key object should be immutable so that hashCode() method always return the same value for that object...
To make an object immutable follow these two rules. One, do not use any setter methods that can change the fields...
In general, Java provides a default constructor with each class. But there are certain cases when we want to...
In Java all the interaction takes place between Object instances. To create an Object instance, JVM needs...
Information hiding is OOPS concept. In Java you can use encapsulation to do Information hiding. An object...
As the name suggests, a package contains a collection of classes. It helps in setting the category of a file...
When we want to cast a Sub class to Super class, we use Upcasting. It is also known as widening. Upcasting is always allowed in Java...
A Class is a template or a blue print of an Object to be created. An Object is an instance of a Class. A Class...
When we want to overload a method, we need to make sure that the method name remains same. But method...
During the run time the behavior of an Object can change based on its run time state. Due to this run time...
Since String objects are cached in a String pool, it makes sense to make the String immutable. The cached String...
Java supports Method overloading but does not support operator overloading. It would make the design more...
Since JSP pages are dynamically compiled into servlets, the programmers can easily make updates to the presentation layer code...
Both Cookie and Session are used during communication between Client and Server. The Client can disable...
Throwable class is the superclass of Exception and Error classes in Java...