A
Q. What will be the output of the following Java code?
Code:
class output
{
public static void main(String args[])
{
char ch;
ch = "hello".charAt(1);
System.out.println(ch);
}
}
{
public static void main(String args[])
{
char ch;
ch = "hello".charAt(1);
System.out.println(ch);
}
}
- Correct Answer - Option(B)
- Views: 17
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.