Sail E0 Webinar
Question

What is the string contained in s after following lines of code?

 StringBuffer s new StringBuffer("Hello);

 s.deleteCharAt(0);

Options:
A .  Hell
B .  ello
C .  Hel
D .  llo
Answer: Option B


deleteCharAt() method deletes the character at the specified index location and returns the resulting StringBuffer object.



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers