πŸ“Š JAVA
Q. 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
  • (D) 5 8
πŸ’¬ Discuss
βœ… Correct Answer: (C) 4 9

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
198
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Priyanka Tomar
Publisher
πŸ“ˆ
96%
Success Rate