जॉइन Examsbook
4572 0

प्र: What is the string contained in s after following lines of code? StringBuffer s = new StringBuffer(“Hello”); s.deleteCharAt(0);  ?

  • 1
    llo
  • 2
    Hllo
  • 3
    ello
  • 4
    H
  • उत्तर देखें
  • Workspace

उत्तर : 3. "ello"
व्याख्या :

Answer: C) ello Explanation: deleteCharAt() method deletes the character at the specified index location and returns the resulting StringBuffer object. So after deleting the character at 0 ie 'H', the string returns 'ello' as the output.

क्या आपको यकीन है

  त्रुटि की रिपोर्ट करें

कृपया संदेश दर्ज करें
त्रुटि रिपोर्ट सफलतापूर्वक जमा हुई