How to validate a null or empty array in Java
int[] arr = null;
if (arr != null && arr.length > 0){
///......
}
Tuesday, August 8, 2017
Saturday, July 8, 2017
Solution: Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
Problem: Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
Solution: Run / Run Configurations / Java Application (select the class) / Arguments / VM arguments

Xms - for minimum limit
Xmx - for maximum limit
Solution: Run / Run Configurations / Java Application (select the class) / Arguments / VM arguments
-Xms512M -Xmx1024M
Or
-Xms1024M -Xmx2048M
Xms - for minimum limit
Xmx - for maximum limit
Subscribe to:
Posts (Atom)