logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is the string contained in s after following lines of code? StringBuffer s = new StringBuffer(?Hello?); s.deleteCharAt(0); ?


  • Options
  • A. llo
  • B. Hllo
  • C. ello
  • D. H

  • Correct Answer
  • 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.

  • Tags: Analyst, IT Trainer

    Technology problems


    Search Results


    • 1. Which of the following are incorrect form of StringBuffer class constructor ?

    • Options
    • A. StringBuffer(int size , String str)
    • B. StringBuffer(int size)
    • C. StringBuffer(String str)
    • D. StringBuffer()
    • Discuss
    • 2. What is immutable object? Can you write immutable object ?
    • Discuss
    • 3. What is the difference between ViewState and SessionState?
    • Discuss
    • 4. How can you avoid callback hells ?
    • Discuss
    • 5. What is Spring IoC container ?
    • Discuss
    • 6. What is Cocoa and cocoa touch?
    • Discuss
    • 7. Give example scenarios when an application goes into InActive state?
    • Discuss
    • 8. What are the tools required to develop iOS applications?
    • Discuss
    • 9. What is Automatic Reference Counting (ARC) ?
    • Discuss
    • 10. What is ARC ?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment