Discussion Forum : Introduction To Methods And Streams
Question -


What is the output of this program?


class output {
public static void main(String args[])
{
StringBuffer s1 = new StringBuffer("Hello");
s1.deleteCharAt(1);
System.out.println(s1);
}
}
Options:
A .  Hell
B .  ello
C .  Hllo
D .  Helo
Answer: Option C

None.
Output:
$ javac output.java
$ java output
Hllo



Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *