-
What is the string contained in s after following lines of code?
StringBuffer str new StringBuffer("ZMania");
str.deleteCharAt(0);
-
- ZMania
- Mania
- ania
- ZMani
- None of these
Correct Option: B
deleteCharAt() method deletes the character at the specified index location and returns the resulting StringBuffer object.