Examveda
Examveda

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

A. hello

B. java

C. Hello Java

D. HJavaello

Answer: Option D


This Question Belongs to Java Program >> Strings

Join The Discussion

Related Questions on Strings