Q. What will be the output of the following Java code?

Code:
class output 
{
    public static void main(String args[])
    { 
         StringBuffer c = new StringBuffer("Hello");
         System.out.println(c.length());
    }
}
  • (A) 4
  • (B) 5
  • (C) 6
  • (D) 7
πŸ’¬ Discuss
βœ… Correct Answer: (B) 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
102
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ritu Singhal
Publisher
πŸ“ˆ
84%
Success Rate