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
The reason the question is in... View full answer
Get step-by-step solutions from verified subject matter experts
