Question: What is the output of this program? class output { public static void main(String args[]) { StringBuffer s1 = new StringBuffer(Hello); s1.setCharAt(1,x); System.out.println(s1); } }

What is the output of this program?

class output {

public static void main(String args[])

{

StringBuffer s1 = new StringBuffer("Hello");

s1.setCharAt(1,x);

System.out.println(s1);

}

}

a) xello
b) xxxxx
c) Hxllo
d) Hexlo

Step by Step Solution

3.40 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The reason the question is in... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Biology Questions!