1, Java Program starting point is----"public static void Main (String args[]);
2. Java identifier----The names of packages, classes, methods, parameters, and variables in Java can be made up of any order of uppercase and lowercase letters, numbers, underscores, and dollar signs, but identifiers cannot start with numbers and cannot use Java reserved words.
3, the definition of the constant, its value is fixed------"final
4, variable----"variable can be used to save the data, before using the variable must declare its pre-saved data type, in Java, the provision of eight basic data type variables to store integers, floating-point numbers, characters and Boolean values.
The data type of the variable: integer (int), long Integer (long), short integer, float (float), double-precision floating-point type (double), character type (char), String type (String)
Variable name restrictions are like identifiers
Assigning values to variables: 1, assigning values at the time of declaration
2, the first declaration after the assignment value
3. Assign values anywhere in the program
Query method for the default maximum value constants for Java:
classvariable_1{ Public Static voidMain (String args[]) {Longlong_max=Java.lang.Long.MAX_VALUE; intint_max=Java.lang.Integer.MAX_VALUE; Shortshort_max=Short.max_value; bytebyte_max=Byte.max_value; System.out.println ("Long maximum" +Long_max); System.out.println (Maximum value of int +Int_max); System.out.println ("Short Max" +Short_max); System.out.println (Maximum value of Byte +Byte_max); }}
Java Basic data types