Outputs
Outputs
int i = word.length() - 1;
result += word.charAt(i);
i--;
System.out.println(result);
} }
int x=4;
while (x != 0) {
if (x % 3 == 0 && x != 9/3)
System.out.println(x++);
else
System.out.println(x--);
} }
int x = 10;
int y = 4;
System.out.println(result);
} }
int number = 2;
int bonus = 1;
switch (number) {
case 1:
bonus += 1;
case 2:
if (bonus > 0) {
bonus++;
break;
case 3:
bonus += 3;
case 4:
bonus = 4;
break;
default:
bonus = 0;
System.out.println(totalGrade +bonus);
} }
public class Q1_1 {
public static void main(String[] args) {
String word = "tea";
String result ="";
int i = word.length() - 1;
while(i >= 0){ aet
result += word.charAt(i);
i--;
}
System.out.println(result);
} }