š§
Java
- Developed by Sun Micro-Systems
- First programming language that wasn't tied to an operating system or hardware
- General purpose programming language
JVM (Java Virtual Machine)
- Programs are compiled into Bytecode
- The Java Virtual Machine is an interpreter that executes Bytecode
Programs
- Every program must have at least one class
- All other code is inside that class
- Program always begins executing at the
main
methodmain
must always be defined in the same way
Data Types
Keyword | Size | Description | Value |
---|---|---|---|
byte | 1 byte | Byte-length integer | to |
short | 2 bytes | Short integer | to |
int | 4 bytes | Integer | to |
long | 8 bytes | Long integer | to |
float | 4 bytes | Single-precision floating point | |
double | 8 bytes | Double-precision floating point | |
char | 2 bytes | A single character | All characters |
boolean | N/A | A Boolean value | True or false |