Simple Java Tips

HomeBadges
Blog Author Picture

Yogesh Mali

1 follower

I write about Java, Spring Boot.

Subscribe to my newsletter and never miss my upcoming articles

Difference between valueOf and parse methods

Sep 3, 20201 min read

In 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...

How to use Streams API

Aug 25, 20201 min read

Java 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...

Avoid String Concatenation

Aug 15, 20201 min read

If 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...

© 2021 Simple Java Tips

PrivacyTerms
Proudly part of