Object Oriented Programming
Object Oriented Programming
int age;
age = 15;
else
System.out.println("Input error");
char raceCode;
raceCode = 'M';
switch (raceCode){
default: System.out.println("Others");
}
}
3. Belajar do while
int i;
i=0;
do {
System.out.println(i);
i++;
while (i<5);
4. nested loops
System.out.print("*");
System.out.println();
}
5. Method
int a=67;
int b=80;
int max;
max = no1;
else
max = no2;
return max;
6. Array
System.out.println(cars[i]);
7. Assignment array
Soalan 1
System.out.println(value[i]);