Naming Conventions Used in Java -

(Notations Used : U -> for Uppercase letter, L -> for Lowercase letter)

Java follow a standard naming convention for their classes, methods and variables names. All the predefined classes, methods and variables are written using this naming convention. You are note forced to follow the same naming convention, but it is a good practice to follow the same naming convention.

  • Class Name - U_____U______U_____U_____ : A class name may be a combination of one, two or more English words; the first letter of each word in the class name is Capital. This convention is followed by all the predefined classes in java.
    For example - System, PrintStream, InputStreamReader etc

  • Methods name - L______U______U______U______ : Method name may also be a combination of one, two or more words, the first letter of first word is in lowercase and the remaining letter's first word is in uppercase. This convention is followed by all the predefined methods in java.
    For Example - parseInt(), readLine(), console() etc.

  • Variables name : Variables follow the same naming convention as methods.