If 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
/n = new line
/t = tap
/" = "
/* = multiple
Click src > main > new > Java class (then type the code)
public class Hello
int[] ex1 = new int [3];
ex1[0]= 1;
ex2[1]= 2;
ex3[2]= 3;
String name = "bacon"
or
String name = 'Bacon'
|
Java
|
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.
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.