Home » JAVA Programming » Strings » Question
  1. What is the string contained in s after following lines of code?
    StringBuffer str new StringBuffer("ZMania");
    str.deleteCharAt(0);
    1. ZMania
    2. Mania
    3. ania
    4. ZMani
    5. None of these
Correct Option: B

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



Your comments will be displayed only after manual approval.