I was wondering if there is a naming convention for variables that represent a reserved word. For example, I have class called Video
and this video must contain a boolean defining whether it's private or not.
Since private boolean private;
would not work, I wonder what the best option was.
Any suggestions?
If you can think of a two-word name, you're clear of any conflict:
private
-> isPrivate
new
-> newItem
Plus, it will often be more readable.
The only common name conflict I'm seeing regularly is the class
-> clazz
mentioned above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With