Cheatography
https://cheatography.com
data types
byte |
8 bits |
shoryt |
16 bits |
int |
32 bits |
long |
64 bits |
boolean |
bit |
char |
16 bits unicode |
float |
32 bits decimal |
double |
64 bits decimal |
Function
System.out.print() |
print in the same line |
System.out.println() |
print in the different line |
public static |
modifier |
charAT() |
Return the character at the specified index |
Boolean |
True or False |
Swap
Public class Main {
public static void swap(int[] list, int e1, int e2){
int temp;
temp = list[e1];
temp = list[e2];
list[e2] = list[e1];
list[e1] = temp;
for (int i : list){
System.out.println(i);
}
}
public static void main(String[] args) {
int[] mylist = new int[]{1,2,3,4,5};
swap(mylist, 1, 2);
}
}
|
|
|
object
class |
a blue print for an object |
object |
an instance of a class |
package |
Organization of a class |
Vocab
Program Execution |
Running program |
Java Bytecodes |
the instruction set of the Java virtual machine. |
Java Virtual Machine (JVM) |
an abstract computing machine that enables a computer to run a Java program. |
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by ppinkyy