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.
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.
2 Comments
c
ReplyDeleteD
ReplyDelete