Java Three directions
Javase
Swing---Form
Swt
Javafx
javaee--Enterprise-level development--javaweb
Javame (micro en ...)
Android
JDK---for developers
JRE---Customer-facing (typically deployed on the server)
Java Explanatory language
Java
Simple
High safety
Cross-platform
Write once run anywhere
Write once and run everywhere
Java is a purely object-oriented language
Packaging
Inherited
Polymorphic
Key words
public.
Class
Identifier
Whatever you need to name yourself is called an identifier.
Coding specifications
1, it is forbidden to start with numbers,
Can start with letters, underscores, $
2, follow the Hump naming method
getElementById ()
3, the first letter of the class name must be capitalized
Data type
Four types of eight types:
Integral type
Byte2 8-Time Square
256 (-128-127)
1 bytes
Short2 16-Time Square
2 bytes
Int2 32-Time Square
4
Long2 64-Time Square
8
Floating point Type
Float (single-precision floating-point type)
7 Guests
4
Double (dual ...)
11 digits after the decimal point
8
Boolean type
Boolean
True/false
1 bytes
Character type
Char
Characters are represented by single quotation marks
2 bytes
String
String
Basic Java Knowledge