Vidyalelo
Java Programming · Q85

Strings

Programming · Java Programming · question 85

Q85

What will be the output of the following Java program? class output public static void main(String args[]) String s = "Hello World"; int i = s.indexOf('o'); int j = s.lastIndexOf('l'); System.out.print(i + " " + j);

A.
4 8
B.
5 9
C.
4 9
Answer
D.
5 8

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board