Java is an interpreted language {introduction, efficient, cross-platform (write once run anywhere)}java virtual machine>java compiler>bytecode file---*.class----class loader
Is a pure object-oriented language {encapsulation inheritance polymorphism}
James Gosling (1990 Written Language (oak--oak))
1995 improved to form java----jdk1.0
Identifiers
Anything you need to name yourself is called an identifier
Code specification:
1. Identifiers can be composed of letters (both upper and lower case), _, $, and cannot start with numbers
2. All variable and method declarations must be well-known
3. CamelCase (the first letter of the first word is lowercase, the rest of the words are capitalized)
getElementById()
4. Spaces must be left on both sides of any operator
5. The first letter of the class name must be capitalized
Java basic data types:
Four types and eight types (basic data types):
integer type
byte 2 to the 8th power occupies 1 byte
short 2 to the 16th power occupies 2 bytes
int 2 to the 32nd power occupies 4 bytes
long 2 64 times Square occupies 8 bytes
Floating point
float 7 bits of significand 4 bytes
double 16 bits of significand 8 bytes
boolean
boolean true / false 1 byte
character
char 0 - 65535 2 bytes
string (not of data type)
String
Reference types:
all classes,
all interfaces
, all arrays,
null