Q: What is the difference between "==" and "equals()" in comparing Java String objects?

"==" is shallow comparison. It's actually comparing the two object references to see if they point to the same object.
"equals()" is deep comparison. It compares the actual string values



Q: What is pass-by-value and pass-by-reference in Java?
If the passed in argument was a primitive value like int, char, etc, the passed in primitive value is copied to the method parameter.
Modifying the copied parameter will not modify the original primitive value.
if the passed in argument was an object reference, the passed in reference is copied to the method parameter. The copied reference will still be pointing to the same object.
So, if you modify the object value through the copied reference, the original object will be modified.

Q: Why String class has been made immutable in Java?
For performance & thread-safety.

Q: What is the main difference between String, StringBuffer, and StringBuilder?