Something about naming convention

Hello, I am learning lesson in the following link
https://www.codecademy.com/courses/learn-java/lessons/learn-java-variables/exercises/naming

The lesson gave couple of bad examples, one of them is that: boolean is_human;
The lesson said : “underscores don’t separate words”
what does this mean? underscores are normally used to separate two word and it has been frequently seen in my academic career that underscore are used to name variable that have two word.

I think that “camel case” is usually used to name variables in Java:
boolean isHuman;

1 Like

Hi,
Programming languages have different naming conventions for variables depending on how they’re used.
It makes it easier to follow, understand and debug code if everyone tries to do it the same way. It helps keep it clear whether you’re using a variable, constant, class, function, etc.

(Unfortunately, it’s not consistent between languages. So, something frowned upon in one language could be preferred in another…)

2 Likes