Oracle 1Z0-808 Exam question no. 69

Q.- Given the code fragment: 

String str = "Sweet Sweat";
String str2 = str.trim( ).charAt (6) + "  " + str.indexOf("Sw",1); 
System.out.println(str2); 

What is the result? 

A) -1 

B) S 5 

C) S 6 

D) W 7

E) W 6


⧪ please give your answer in a comment section.

Post a Comment

2 Comments