Cheatography
https://cheatography.com
JAVA StatmentIf Statement
if ( expression ) {
statements
} else if ( expression ) {
statements
} else {
statements
}
While Loop
while ( expression ) {
statements
}
Do-While Loop
do {
statements
} while ( expression );
For Loop
for ( int i = 0; i < max; ++i) {
statements
}
Switch Statement
switch ( expression ) {
case value:
statements
break;
case value2:
statements
break;
default:
statements
}
Do....while
int count=0;
do{
System.out.print(count + " ");
count ++ ;
}while (count < 10);
Ans 0 1 2 3 4 5 6 7 8 9
|
| | Numbersbyte
8 bits
short
16 bits
int
32 bits
long
64 bits
boolean
( no bit just true/ false)
char
16 bit unicode
float
32 bit decimal
double
64 bit decimal |
Command/n = new line
/t = tap
/" = "
/* = multiple
|
make classClick src > main > new > Java class (then type the code)
public class Hello
|
| | Arrays / Listint[] ex1 = new int [3];
ex1[0]= 1;
ex2[1]= 2;
ex3[2]= 3;
|
StringString name = "bacon"
or
String name = 'Bacon'
|
VocabJava | high level programming language that is readable by human called JVM ( Java Virtual Machine ). | Compiler | translater the program into machine language that can be executed directly on the computer. | Executed | Runing | JVM | another run program of Java. It referred to Java runtime. | JDK (Java Development Kit) | contains a complete class library of utilities that help you accomplish most common tasks. | Java runtime | a program that execute compiled Java byte codes. | Java bytecodes | he java complier translate your java program to be an intermediate level, which can be executed only by JVM. |
|
Help Us Go Positive!
We offset our carbon usage with Ecologi. Click the link below to help us!
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by Sonnylnw MUIDS