Cheatography
https://cheatography.com
Data Typesbyte | 8 bits | -27 to 27 - 1 | short | 16 bits | -215 to 215 - 1 | int | 32 bits | -231 to 231 - 1 | long | 64 bits | -263 to 263 - 1 | boolean | true \ false | char | 16 bit unicode | -215 to 215 - 1 | float | 32 bit decimal | -231 to 231 - 1 | double | 64 bit decimal | -263 to 263 - 1 |
Encapsulationpublic | user can see | private | hide from user |
Swapint temp = e1;
e1 = e2;
e2 = temp;
|
While loopwhile(condition) {
//codes
}
|
For Loop Arraystring word = "Hello";
for (char c: word.toCharArray()){
system.out.println()
...
}
|
Classpublic class ABCD {
public A () {
//codes
}
public void B() {
//codes
}
}
*public A = default, run automatic
*public void B = need call
|
| | Do - While loopdo {
//codes
} while (condition);
|
For Loop Listint mylist = {100,200,300,400};
for(int item = 0; item< mylist.length; iterm++){
//codes
}
for(int item mylist) {
//codes
}
|
AbbreviationJVM | JAVA Virtual Machine | JRE | JAVA Runtime Environment | JDK | JAVA Development Kit | bytecode | intermediate level long | compiler | JAVA -> Bytecode | Java Runtime | bytecode -> machine | native compiler | directly to machine |
Arrayint[] mylist = new int[2]
mylist[0] = 100;
mylist[1] = 200;
int[] mylist = {100, 200}
|
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by pca221