Java Variable Naming Convention

In this post, we will discuss the Java variables naming conventions with examples.

Read complete Java naming conventions at https://www.javaguides.net/2018/08/java-standard-naming-conventions.html.

Java Variables naming conventions

The variable name should start with a lowercase letter. Parameter names, member variable names, and local variable names should be written in lowerCamelCase.
Example:
firstName
orderNumber
lastName
phoneNo
id
counter
temp
Few more examples:
public Long id;
 
public EmployeeDao employeeDao;
 
private Properties properties;
 
for (int i = 0; i < list.size(); i++) {
     
}

Reference




Comments