simplejavatips.comDifference between valueOf and parse methodsIn Java, you will see methods like valueOf and parseInt or parseBoolean. Boolean var = Boolean.valueOf("true"); Boolean var = Boolean.parseBoolean("true"); Why we have these kind of duplicate methods? There is a difference in these methods. Bool...Sep 3, 2020·1 min read
simplejavatips.comHow to use Streams APIJava 8 introduced us with Streams. Streams represents a sequence of objects from a source. Streams provide number of APIs for aggregate operation. Streams take arrays, collections or i/o sources for input. Two types of Stream operations: Intermedi...Aug 25, 2020·1 min read
simplejavatips.comAvoid String ConcatenationIf you are using strings in java , especially in a loop, don't use + operator to connect strings. String result = ""; for(String s: strArray) { result = result + s; } return result; The above is bad from a performance perspective. Every time, a...Aug 15, 2020·1 min read