While programming in Java, there is a frequent requirement to check if an Enum contains a given String value. There are multiple ways to validate this. But I find the EnumUtils class of Apache Commons Lang the most convenient to
How to show line numbers in Eclipse
Although it is seems simple but I’ve seen people struggle with this. Therefore, I decided to put a real quick post on how to show line numbers in Eclipse editor. There are two ways to enable line numbers in Eclipse.
How to change user name in Eclipse code templates
When a new code file is created, the author name in the @author is set to the value which is taken from the user.name environment variable. One way to override this value is to modify the eclipse.ini file. Following are
String is immutable in Java
What is an immutable class? An immutable class once instantiated cannot be modified. For example, String is immutable in Java. What is meant by the statement; An immutable class cannot be modified? Let’s try to understand. Once a java.lang.String object
How to call Garbage Collector in Java
Memory management is the process of recognizing when allocated objects are no longer needed, deallocating (freeing) the memory used by such objects, and making it available for subsequent allocations. In Java, memory management is the responsibility of program called the