Constructor Calling in Java

Constructor calling in Java is possible in multiple ways. In this post, we’ll discuss each of those methods in detail. One thing we should remember is that constructor calling is only possible during the object creation. Once the object is created you won’t be able to call the constructor. You can call a constructor in … Read more

Difference Between null and isEmpty in Java

In Java, particularly when you are working with String class, you may have a situation where a String object either has a null or empty string. Java treats null and empty as two different values. They both are not equal. In Java, if a reference variable has its value as null, it means that it … Read more

Arrays.asList in Java Examples

We generally use Arrays.asList method to copy an object array into a List object. It returns a fixed-size List object from the object array that you have passed to this method. Since Arrays.asList method returns a fixed-size List object, you must remember that you cannot add or remove elements from this List object as you … Read more