I am having a problem in understanding how to apply camelCase syntax to some of my variable names.
For example, how should I correctly write a word like "phonenumber" in camel case? Is it phoneNumber
or phonenumber
? Similarly with "username", is it username
or userName
?
I think it doesn't look right with camel case like motorCycle
, passWord
, sunDay
, setUp
or waveLength
since these are just one word each. I think that could be why it's called hashMap
but also hashtable
in camel case without the capital in the last case because hashtable is one word while hash map is two words.
But if the motorcycle has a color then would it be motorcycleColor
since a word is concatenated? Is that correct or should it be phoneNUmber
, waveLength
, sunBlock
and even sunDay
for the Sunday of the week?
Why for instance is the method called getISOCountries
while it says HttpHeaders
e.g. it's not clear what becomes lowercase if we have a method like String camelCaseString = dog.toCamelCase()
or interface CamelCase
.
username
is what it is, it's a call sign, not the "user's name", so it's more like motorcycle than firstName or lastName (which should be camelcased)street
should be a class andname
one of its attributes/data members.