Java Package
© examsiri.com
Question : 6 of 16
Marks:
+1,
-0
Given:
What is the result?
1. public static void test(String str) {
2.   int check = 4;
3.   if (check = str.length()) {
4.    System.out.print(str.charAt(check -= 1) +", ");
5.   } else {
6.   System.out.print(str.charAt(0) + ", ");
7.   }
8. }
and the invocation:
9. test("four");
10. test("tee");
11. test("to"); What is the result?
Go to Question: