Java Naming conventions Java naming convention is a rule to follow as you decide what to name your identifiers such as class, package, variable, constant, method etc. But, it is not forced to follow. So, it is known as convention not rule. All the classes, interfaces, packages, methods and fields of java programming language are given according to java naming convention. Advantage of naming conventions in java By using standard Java naming conventions, you make your code easier to read for yourself and for other programmers. Readability of Java program is very important. It indicates that less time is spent to figure out what the code does. Name Convention should start with uppercase letter class and be a noun e.g. name String, Color, Button, System, Thread etc. should start with uppercase letter and be an interface adjective e.g. name Runnable, Remote, ActionListener etc. should with lowercase letter method and be a verb e.g. name actionPerformed(), main(), print(), println() etc. should start with variable lowercase letter name e.g. firstName, orderNumber etc.
Java Naming conventions Java naming convention is a rule to follow as you decide what to name your identifiers such as class, package, variable, constant, method etc. But, it is not forced to follow. So, it is known as convention not rule. All the classes, interfaces, packages, methods and fields of java programming language are given according to java naming convention. Advantage of naming conventions in java By using standard Java naming conventions, you make your code easier to read for yourself and for other programmers. Readability of Java program is very important. It indicates that less time is spent to figure out what the code does. 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 should 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.
Java-Naming-conventions.docx