Example: Naming Conversion of Java
Example: Naming Conversion of Java
Sun micro system was given following conversions by declaring class, variable, method
etc. So that it is highly recommended to follow this conversion while writing real time
code.
Why Using naming Conversion
Different Java programmers can have different styles and approaches to write program.
By using standard Java naming conventions they make their code easier to read for
themselves and for other programmers. Readability of Java code is important because it
means less time is spent trying to figure out what the code does, and leaving more time
to fix or modify it.
1. Every package name should exist a lower case latter.
Example
package student; // creating package
Java follows camelcase syntax for naming the class, interface, method and variable.
According to CamelCase if name is combined with two words, second word will start with
uppercase letter always. General Example studentName, customerAccount. In term of
java programming e.g. actionPerformed(), firstName, ActionEvent, ActionListener etc.