A

Admin • 828.43K Points
Coach

Q. What will be the output of the following Java code?
class output
{
public static void main(String args[])
{
StringBuffer sb=new StringBuffer("Hello");
sb.replace(1,3,"Java");
System.out.println(sb);
}
}

  • (A) Hello java
  • (B) Hellojava
  • (C) HJavalo
  • (D) Hjava
  • Correct Answer - Option(C)
  • Views: 17
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.