Is immutability an advantage with Wrapper classes over primitive types ?
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. Is immutability an advantage with Wrapper classes over primitive types ? Core Java
Ans. There is no concept of de referencing with primitive types and hence they are implicitly immutable. Having wrapper classes as mutable offers disadvantages compared to primitive types. Wrapper classes being immutable offer similar advantage as primitive types.It actually overshadows the disadvantage wrapper class could have if they are immutable.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     immutable  immutability classes  wrapper classes


Related Questions

  Will this code give error if i try to add two heterogeneous elements in the arraylist. ? and Why ?
  What are the Wrapper classes available for primitive types ?
  What are wrapper classes ?
 What are the benefits of using Wrapper classes over primitive types ?
  Explain Autoboxing ?
 What is the difference between uninitialized values for primitive types and Wrapper classes ?
  Difference between boolean and Boolean ?
  What are Wrapper Classes ? What are Primitive Wrapper Classes ?
  What Design pattern Wrapper Classes implement ?
  Can we compare Integers by using equals() in Java ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: