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);
    }
}
  • (A) h
  • (B) e
  • (C) l
  • (D) o
πŸ’¬ Discuss
βœ… Correct Answer: (B) e

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
109
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
83%
Success Rate