1.1 Java is a language that is executed by means of interpretation and is a cross-platform programming language, and the Java language Program is both compiled and interpreted.
1.2 Features of the Java language:
1, simple: simple syntax
2, Object-oriented: All things are objects
3. Distribution: including operation distribution and data distribution
4. Portability
5. Security
6. Robustness
8. Multithreading
9. High Performance
10. Polymorphism
1.3 First Java Program
Public class helloworld{ publicstaticvoid main (string[] args) { System.out.println ("Hello World");} }
View Code
1.4 Java Main class structure
1 Package Number2 Public classfirst{3 StaticString S1 = "Hello";4 Public Static voidMain (string[] args) {5String s2 = "Java";6 System.out.println (S1);7 System.out.println (S2);8 }9}View Code
1.4.1 declaring member variables and local variables
The properties of a class are often referred to as global variables (member variables) of a class, and properties in a method are referred to as local variables. Global variables are declared in the class body, and local variables are declared in the method body. Both global variables and local variables have their own scope of application.
1.5 Basic data types
There are eight basic types in Java to store numeric, character, and Boolean values:
Basic data type:
1) Numeric: integer type (byte, short, int, long), floating-point type (float, double)
2) character type (char)
3) Boolean type (Boolean)
1.6 Identifier naming specification
Identifiers consist of any sequence of letters, underscores (_), Dollar signs ($), and numbers, and the first character cannot be a number.
Java Learning Notes (i)