Sunday, August 10, 2008

Naming Conventions in java

1. If a name has more the one word, then except the first word others should start with the uppercase.
Examples: setLayout, addLayoutComponent.

2. Variables, fields, and methods names should begin with a lowercase letter.
Examples: vehicle, myVehicle.

3. classes and interfaces names should begin with an uppercase letter.
Examples: Cube,ColorCube.

4. Named constants like final variables and fields should be written entirely in uppercase, and the parts of composite names are separated by underscores (_).
Examples: CENTER,MAX_VALUE.

5. Package names are sequences of dot-separated with lowercase names.
Example: java.awt.event.

No comments:

private methods on Interface

  Private methods can be used on interface from java 9.   This will help in     Avoiding code duplication.     Ensuring code re-usab...