|
byte
|
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
|
|
public
|
user can see
|
|
private
|
hide from user
|
int temp = e1;
e1 = e2;
e2 = temp;
while(condition) {
//codes
}
string word = "Hello";
for (char c: word.toCharArray()){
system.out.println()
...
}
public class ABCD {
public A () {
//codes
}
public void B() {
//codes
}
}
*public A = default, run automatic
*public void B = need call
|
\n
|
new line
|
|
\t
|
tab
|
|
\"
|
"
|
|
\'
|
'
|
|
\\
|
\
|
do {
//codes
} while (condition);
int mylist = {100,200,300,400};
for(int item = 0; item< mylist.length; iterm++){
//codes
}
for(int item mylist) {
//codes
}
|
JVM
|
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
|
int[] mylist = new int[2]
mylist[0] = 100;
mylist[1] = 200;
int[] mylist = {100, 200}
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.