Examveda
Examveda

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

Answer: Option C


This Question Belongs to Java Program >> Strings

Join The Discussion

Related Questions on Strings