tags: Identifier Name specification type of data
Some names that are customized in the program.
Composed of 26 English letters, number: 0-9 Symbol: _ $
Define legal identifier rules:1. The number cannot be started.
2. No keywords can be used.
Name specification in Java:
• xxxyyyzzz
• XxxYyyZzz
• xxxYyyZzz
Among them, the basic data type size is as follows:
Integer type: (The bold part below is the wrapper class for each data type)
byte (1 byte) (Byte), short (2 bytes) (Short), int (4 bytes) (Integer), long (8 bytes) (Long)
Floating point type:
float(4 bytes)(Float), double(8 bytes)(Double)
Logical:
boolean(true/false)(Boolean)
Character:
char (2 bytes) (Character)
Byte: A byte type integer occupies 8 bits in memory. The range of the table number is -128(-2^7)~127(2^7-1)
short: A short type integer takes up 16 bits in memory, and the table number ranges from -32768(-2^15)~32767(2^15-1)
int: An integer of type int occupies 32 bits in memory, and the range of the table number is -2147483648(-2^31)~2147483647(2^31-1)
long: A long type integer takes 64 bits in memory, and the table number ranges: (-2^63)~(2 ^63-1)
Note: long l = 4l;
float f = 2.3f;
The range of the basic data type is byte->short->int->long->float->double (range from small to large)
Basic data type interview questions:
[java interview questions] Basic data types and other issues:
Some basic concepts of identifiers The identifier is the name used in programming: Java's sequence of characters used for naming packages, classes, interfaces, methods, variables, constants (excluding...
~ New Java article appeared, this content book is aboveJava first program。 Let's talk about the most basic content in Java -type of dataversusIdentifier type of data As a high-level programming langua...
Comment Multi-line comments / * Note * / Untrue note // Note Text Notes / ** * / Identifier Keyword All parties of Java need name. Class names, variable names, and method names are called identifiers....
Java identifier All identifiers can only start with letters (case), $, _, start type of data Java is a strong type language: All variables must be defined before they can be used Floating point expans...
Java identifier, data type and expression Article catalog Java identifier, data type and expression First, identifier and data type 1.1 Java basic syntax unit 1.1.1 Notes 2.1.3 Keywords 2.1.4 identifi...
1 java grammar basics 1.1 identifier The identifier can be simply understood as a name. In Java, we need to identify many elements of the code, including class names, methods, fields, variables, packa...
// Excerpt from Huawei to write specifications 1, the naming of the identifier is clear, clear, clear meaning, and use a complete word or abbreviation, you can basically understand, avoid misunderstan...
Identifier rule Java strictly sized Alphanumeric _ $ composition Number can't start Identifier cannot contain spaces Name specification Package: xxyyzzz Class name: xxyyzzz Variable name method name: ...
Identifiers and keywords The identifier in Java refers to the name, class name, and attribute name. Requirements: The indicator consists of letters, numbers, _, $, ¥, which cannot be started with ...
Foreword The complexity of modern software architecture needs to be collaborative development, how can I collaborate efficiently? There is no rules that are not square, and there is no standard. For e...