- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java Naming conventions
All Java components require names. Names used for classes, variables and methods are called identifiers. In Java, there are several points to remember about identifiers. They are as follows -
All identifiers should begin with a letter (A to Z or a to z), currency character ($) or an underscore (_).
After the first character, identifiers can have any combination of characters.
A keyword cannot be used as an identifier.
Most importantly, identifiers are case sensitive.
Examples of legal identifiers: age, $salary, _value, __1_value.
Examples of illegal identifiers: 123abc, -salary.
A class name should start from a capital case letter and long names should use camel casing. For example: TaxationDepartment
Object name should start from lower case letter and long names should use camel casing. For example: taxationDepartment
- variable naming conventions of java
- CamelCase in Java naming conventions
- Advantages of naming conventions in Java
- Naming Conventions in C#
- Explain naming conventions for packages in java?
- Why we should follow the naming conventions in Java?
- How to define the naming conventions for JSON field names in Java?
- Java variable naming rules
- Naming a thread in Java
- Best practice for variable and method naming in Java
- Lexical Conventions in Lua Programming
- Semicolon Conventions in Lua Programming
- What is a hierarchical naming system?
- What are the rules for naming classes in C#?