PCSalt
YouTube GitHub

# java

5 posts

Rearrange positive and negative number in array with only one variable - Java

Problem statement: We have a list of positive and negative numbers in a random order. We have to rearrange the...

Convert JSON values into comma separated values - Java

JSON is a light-weight format to store and transport data. But sometimes it is required to convert it into some...

Check if a String is a Balanced String

A balanced String is a String with equal number of opening and closing matched brackets. In other words, an expression...

== vs equals() in Java — What's the difference?

Understanding the difference between the == operator and equals() method in Java, and why using the wrong one leads to subtle bugs.

String Concatenation in Java — concat() vs + vs StringBuilder

Understanding the real differences between concat(), the + operator, and StringBuilder in Java — what actually matters and what doesn't.