This is a draft cheat sheet. It is a work in progress and is not finished yet.
Java Data Types
Data Type |
Size/Bits |
Default Value |
byte |
8 |
0 |
short |
16 |
0 |
int |
32 |
0 |
long |
64 |
0 |
float |
32 |
0.0 |
double |
64 |
0.0 |
boolean |
1 |
false |
char |
16 |
\u0000 |
Java Naming Conventions
Name Type |
Description |
Variable Names |
Can start with a letter, $(Dollar Symbol), or '_' underscore; cannot start with a number; cannot be a reserved word |
Method Names |
Verbs or verb phrases with first letter in lowercase, and the first letter of subsequent words capitalized; cannot be reserved words. Example: setColor(); |
Class and Interface Names |
Descriptive names that begin with a capital letter, by convention; cannot be a reserved word. |
Constant Names |
They are in capitals |
|
|
|
|
|