logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What is immutable object? Can you write immutable object ?


  • Correct Answer
  • Immutable classes are Java classes whose objects can not be modified once created Any modification in Immutable object result in new object For example is String is immutable in Java Mostly Immutable are also final in Java, in order to prevent sub class from overriding methods in Java which can compromise Immutability You can achieve same functionality by making member as non final but private and not modifying them except in constructor 

  • Tags: Analyst, Database Administrator, IT Trainer, Project Manager

    Technology problems


    Search Results


    • 1. What is the difference between ViewState and SessionState?
    • Discuss
    • 2. How can you avoid callback hells ?
    • Discuss
    • 3. What is Spring IoC container ?
    • Discuss
    • 4. Difference between Arraylist and Linked list?
    • Discuss
    • 5. How to identify a given positive decimal number as even/odd without using % or / operator ?
    • Discuss
    • 6. 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
    • 7. 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
    • Discuss
    • 8. What is Cocoa and cocoa touch?
    • Discuss
    • 9. Give example scenarios when an application goes into InActive state?
    • Discuss
    • 10. What are the tools required to develop iOS applications?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment