Naming Conventions

It's common to use a variable naming convention to distinguish between fields, arguments, and local variables

All the classes, interfaces, packages, methods and fields of java programming language are given according to java naming convention.

Name Convention
class name should start with uppercase letter and be a noun e.g. String, Color, Button, System, Thread etc.
interface name should start with uppercase letter and be an adjective e.g. Runnable, Remote, ActionListener etc.
method name Methods in Java also follow the same lowerCamelCase convention like Objects and variables.should start with lowercase letter and be a verb e.g. actionPerformed(), main(), print(), println() etc.
variable name should start with lowercase letter e.g. firstName, orderNumber etc.
package name should be in lowercase letter e.g. java, lang, sql, util etc.
constants name should be in uppercase letter. e.g. RED, YELLOW, MAX_PRIORITY etc.