Is variable name in Java case-sensitive?

The rules and conventions for naming your variables can be summarized as follows: Variable names are case-sensitive . A variable’s name can be any legal identifier — an unlimited-length sequence of Unicode letters and digits, beginning with a letter, the dollar sign ” $ “, or the underscore character ” _ “.

Read more

What happens if you use == for String?

In String, the == operator is used to comparing the reference of the given strings , depending on if they are referring to the same objects. When you compare two strings using == operator, it will return true if the string variables are pointing toward the same java object. Otherwise, it will return false .

Read more