0
Output of given segment: String st = âPROGRAMâ; System.out.println(st.indexOf(st.charAt(4)));
4 Answers
+ 1
https://code.sololearn.com/c81NyEYSUa9N/#java
Output is 1
0
Just run it in the code playground and see for yourself. It's a way better and faster way to get the answer to your question.
0
Yes. That's because charAt(4) is 'R' and the first index of 'R' in 'PROGRAM' is 1.
0 1 2 3 4 5 6
P R O G R A M
0
Answer I need