Question 111 · 200 in bank
Given the code fragment:
What is the result?
Show answer
Answer: A
Explanation
Answer is A. Because String str is "Sweet Sweat" not "Sweet sweat" String str="Sweet Sweat"; String str2=str.trim().charAt(6)+" " + str.indexOf("Sw",1); System.out.println(str2); // S 6
Source: Adapted from community discussion — UAK94
