P
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);
}
}
- Correct Answer - Option(C)
- Views: 87
- Filed under category JAVA
Discusssion
Login to discuss.