
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
variable naming conventions of java
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.
- Related Questions & Answers
- Java Naming conventions
- What are Variable Naming Conventions in JavaScript
- Advantages of naming conventions in Java
- CamelCase in Java naming conventions
- Naming Conventions in C#
- Explain naming conventions for packages in java?
- Java variable naming rules
- Why we should follow the naming conventions in Java?
- How to define the naming conventions for JSON field names in Java?
- Best practice for variable and method naming in Java
- Naming a thread in Java
- Types of variable in java
- Lexical Conventions in Lua Programming
- Semicolon Conventions in Lua Programming
- java variable declaration
Advertisements