Given:
18. String s = ” abcdcba “;
19. int x = 2;
20. s = s.trim();
21. if (s.length() < 8) {
22. x = s.indexOf(‘c’, 3);
23. }
24. System.out.println(“x = ” + x);
What is the result?
A.
x = 5
B.
x = 3
C.
x = 6
D.
x = 4
E.
x = 2
Given:
18. String s = ” abcdcba “;
19. int x = 2;
20. s = s.trim();
21. if (s.length() < 8) {
22. x = s.indexOf(‘c’, 3);
23. }
24. System.out.println(“x = ” + x);
What is the result?
Given:
18. String s = ” abcdcba “;
19. int x = 2;
20. s = s.trim();
21. if (s.length() < 8) {
22. x = s.indexOf(‘c’, 3);
23. }
24. System.out.println(“x = ” + x);
What is the result?
A.
x = 5
B.
x = 3
C.
x = 6
D.
x = 4
E.
x = 2