i was asking a question before of a completely different topic and got to know that i am not writing code that respects java standard naming convention. first i thought it doesn’t quite matter what i name my variables or methods or classes, but after reading some comments i have come to know that it indeed does.
so, will you guys please tell me what the standard java naming conventions are? and i’d probably need a good article or tutorial on it too.
also, have you had any past experience of facing problems because you don’t use standard java naming conventions?
also, how much time will it take me to keep those in mind?
how do you tell weather someone is respecting the standard java naming convention?
how important is it to maintain code?
there are a bunch of other questions too but i’ll save that for later.
A very short explanation:
MyClass(every new word starts with a capital letter)void myFunction()(starts with a small, every newword with capital)
int myVariable(same as function)static final int MY_STATIC_STUFF(allcharacters are capitals)
There is a big question with braces. Someone likes to use it like this:
and someone likes to use it like this:
I think it’s really important to follow some convention, because long codes can quickly become unreadable, if you don’t. Thankfully IDEs like
NetBeansandEclipsehelp developers to make it easier.