[JAVA basics] Variables

Precautions:

1. If you create multiple variables, the names between the variables cannot be repeated.

2. For float and long types, the letter suffixes F and L cannot be dropped

3. If you use short or byte type variables, then the data value on the right cannot exceed the range of the type on the left

4. Variables without assignment cannot be used, only assignment can be used

5. Variables cannot exceed the scope of the scope

 [Scope] starts with defining a variable and ending with the braces.

Guess you like

Origin www.cnblogs.com/paulwinflo/p/12716488.html