Search Your Dot Net Topic

Wednesday 11 March 2020

Variable and Naming Rules






What is Identifiers in java, , YCMOU Java Course
What is Identifiers in java?


What is Identifiers?
Name of Class , Variable  and methods, functions called Identifiers.







Variable in Java, YCMOU Java training
Variable in Java



What is Variable? A variable is thing which created and stay in memory and it contain a data value.




Naming rules in Java:
All variable/class name (identifiers) should start with alphabet letter, an underscore _ or dollar  $ sign.

After the first character variable can have numeric character.
No space or special characters are allowed.

Java reserved keyword cannot be used as variable name.

Example:
Valid Variable Name
SchoolName
_schoolName
School_Name
School12Name


Not Valid Variable Name
12SchoolName 
(SchoolName)
















No comments:

Post a Comment