-
What is the output of this program?
public class string_Example
{
public static void main(String args[])
{
String obj = "I LIKE INTERVIEW MANIA";
System.out.println(obj.charAt(10));
}
}
-
- I
- L
- K
- N
- E
Correct Option: E
charAt() is a method of class String which gives the character specified by the index. obj.charAt(10) gives 4th character i:e I.
output: E