By convention, which of the following is a good name for a named constant?
Naming Convention
As you decide what to call your identifiers, such as class, package, variable, constant, method, etc., the Java naming convention is a rule to follow.
It is not, however, compelled to comply. So, it is recognized that tradition does not rule. Several Java groups, such as Sun Micro systems and Netscape, recommend these conventions. All Java programming language classes, interfaces, packages, methods and fields are provided as per the Java naming convention. If you fail to obey these conventions,
confusion or inaccurate code can be created.
To make the code readable for yourself and for other programmers by using common Java naming conventions.
Java software readability is very critical. It shows that less time is spent finding out what the code is doing.
The following are the major rules that any identifier must follow:
- No white spaces must be found in the name.
- You should not begin the name with special characters such as & (ampersand), $ (dollar),
Trending now
This is a popular solution!
Step by step
Solved in 2 steps