Every programming language has its own set of rules and conventions for the kinds of names that you're allowed to use, and the Java programming language is no different. The rules and conventions for naming your variables can be summarized as follows:
Variable names are case-sensitive. A variable's name can be any legal identifier — an unlimited-length sequence of Unicode letters and digits, beginning with a letter, the dollar sign "$", or the underscore character "_". The convention, however, is to always begin your variable names with a letter, not "$" or "_". Additionally, the dollar sign character, by convention, is never used at all. You may find some situations where auto-generated names will contain the dollar sign, but your variable names should always avoid using it. A similar convention exists for the underscore character; while it's technically legal to begin your variable's name with "_", this practice is discouraged. White space is not permitted.
Subsequent characters may be letters, digits, dollar signs, or underscore characters. Conventions (and common sense) apply to this rule as well. When choosing a name for your variables, use full words instead of cryptic abbreviations. Doing so will make your code easier to read and understand. In many cases it will also make your code self-documenting; fields named cadence, speed, and gear, for example, are much more intuitive than abbreviated versions, such as s, c, and g. Also keep in mind that the name you choose must not be a keyword or reserved word.
If the name you choose consists of only one word, spell that word in all lowercase letters. If it consists of more than one word, capitalize the first letter of each subsequent word. The names gearRatio and currentGear are prime examples of this convention. If your variable stores a constant value, such as static final int NUM_GEARS = 6, the convention changes slightly, capitalizing every letter and separating subsequent words with the underscore character. By convention, the underscore character is never used elsewhere.
Variables are used to store data.
Please Subscribe
https://www.youtube.com/c/Infinity_IT...
Java Basic Tutorials || Burmese Language
• Java Basic Tutorials || Burmese Language
What is Java ? // Why Use Java ? // Burmese Tutorials
• What is Java ? // Why Use Java ? // Burmes...
Java Syntax && Java Output / Print //Burmese Tutorials
• Java Syntax && Java Output / Print @Inf...
The Print Method // Java Print Number // Java Double Code //Burmese Tutorials
• The Print Method // Java Print Number // J...
Java Comments // Burmese Tutorials
• Java Comments // Burmese Tutorial @Infini...
What is Java Variable & How Many Type Of Java Variable //Burmese Tutorials
• What is Variable in Java (Burmese Tutorial...
How to declare variables? || Java Integer Data Type || Burmese Tutorials
• How to Declare variables? | Declaring and ...
Java Floating Point Numbers - float and double - Java Tutorial || Burmese Tutorials
• Java Floating Point Numbers - float and do...
Character Data Type in Java Programming and Use Of char Variable || Burmese Tutorials
• Character Data Type in Java Programming a...
The boolean Data Type in Java || Burmese Tutorials
• The boolean Data Type in Java || Burmese T...
Character Escape Sequence in Java || Burmese Tutorials
• Character Escape Sequence in Java || Burme...
Java Final Variable || Burmese Tutorials
• Java Final Variable || Burmese Tutorials @...
Java Display Variables with Plus Sign || Burmese Tutorials
• Java Display Variables with Plus Sign ||Bu...
How to Declare Many Variables in Java || Burmese Tutorials @Infinity_IT
• How to Declare Many Variables in Java || B...
Rules for Identifiers in Java || Burmese Tutorials @Infinity_IT
• Rules for Identifiers in Java || Burmese T...
What are Reserved Keywords in Java? || Burmese Tutorials @Infinity_IT
• What are Reserved Keywords in Java? || Bur...
The Data Types in Java | What is DataType? Explanation || Burmese Tutorials @Infinity_IT (Part - 1)
• The Data Types in Java | What is DataType?...
The Data Types in Java | What is DataType? Explanation || Burmese Tutorials @Infinity_IT (Part - 2)
• The Data Types in Java | What is DataType?...
Get Eclipse IDE 2022
• Get Eclipse IDE 2022
How To Create, Build And Run A Java Hello World Program With Intellij Idea On Windows 10
• How To Create, Build And Run A Java Hello ...
How To Uninstall Intellij IDEA Community Edition 2022 || Burmese Tutorial @Infinity_IT
• How To Uninstall Intellij IDEA Community E...
#Infinity_IT
#Infinity_IT #InfinityIT #InfinityITMyanmar #BurmeseInfinityIT #CSS #HTML #Javascript #JavaScript. #Java #React #Angular
#ObjectiveC #Scala #Python #C# #C++ #PHP #Perl #Java #Java #Java8 #JavaSE #BurmeseTutorials #Tuto #Assignment #package
#import #class #interface #abstract #public #private #protected #extends #implements #this
#super #byte #int #short #char #float #double#long #boolean #return #try#catch #finally #final #throw#throws
#do #while #for #if #else #switch #default #break
#continue #enum #instanceof #native #volatile #new #channel #infinityIT #Information #မြန်မာ #နည်းပညာ