JVM (Java Virtual Machine)


  • Every program must have at least one class
    • All other code is inside that class
  • Program always begins executing at the main method
    • main must always be defined in the same way

Data Types

Keyword Size Description Value
byte 1 byte Byte-length integer āˆ’128-128 to 127127
short 2 bytes Short integer āˆ’32768-32768 to 3276732767
int 4 bytes Integer āˆ’2147483648-2147483648 to 214748364214748364
long 8 bytes Long integer āˆ’263-2^{63} to 263āˆ’12^{63} - 1
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

Computer Science Programming Language