| Packages |
Package names should be all lowercase. |
package com.sun.org; |
| Classes |
Class names should be nouns with the first letter of each word starting with uppercase. |
class CampusArea; class WebServiceAccess; |
| Interfaces |
Interface names should be nouns with the first letter of each word starting with uppercase.All interface names should be prefixed with letter “i”. |
interface iEmployeeProfile; interface iStudentInfo; |
| Methods |
Methods should be verbs with the first letter in lowercase and the first letter of each subsequent concatenated word capitalized. |
display();getArea(); |
| Variables |
Variables, including class variables, should have first letter in lowercase, and the first letter of each subsequent concatenated word
starting with uppercase.Variables should be prefixed with its type followed by a short but meaningful name. Throwaway variables need not be prefixed with their type. |
int iEmpId;int iUserId;String strEmpName; |
| Constants |
Constants should be all uppercase separated with an under-score “_”. Constants must be defined as static, until & unless the constant value differs from one object instance to another. |
static final int PIN_CODE = 1024 |
| HTML Form Fields |
Field name should start with the first letter in lowercase, and the first letter of each internal word starting with uppercase.
Variables should be prefixed with its element type followed by a short but meaningful name. |
txtName selState |