About 196,000 results
Open links in new tab
  1. java - Immutable class? - Stack Overflow

    Jul 2, 2010 · How can one make a Java class immutable, what is the need of immutability and is there any advantage to using this?

  2. How to create immutable class in java - Stack Overflow

    Dec 25, 2013 · How can create immutable class in java. if Student class has a relationship (address) how to create immutable class. I want to make the class below immutable final public class Student {

  3. How to create immutable objects in Java? - Stack Overflow

    Jun 10, 2011 · How to create immutable objects in Java? Which objects should be called immutable? If I have class with all static members is it immutable?

  4. immutability - Make immutable Java object - Stack Overflow

    Here are few rules, which helps to make a class immutable in Java : 1. State of immutable object can not be modified after construction, any modification should result in new immutable object.

  5. How to make an immutable class in Java? - Stack Overflow

    May 9, 2018 · 1 I came across this exercise online where I have two classes and I'm supposed to make the Tutor class immutable. However, the only thing I can think of is adding final to name field. When …

  6. java - Why do we need immutable class? - Stack Overflow

    The Java platform libraries contain many immutable classes, including String, the boxed primitive classes, and BigInte- ger and BigDecimal. There are many good reasons for this: Immutable classes …

  7. How to create an immutable class in Java without using final keyword ...

    Mar 23, 2011 · Possible Duplicate: Implement a final class without the “final” keyword I want to create an immutable class in Java without using the final keyword.

  8. java - Examples of immutable classes - Stack Overflow

    Feb 25, 2011 · I already know the definition of immutable classes but I need a few examples.

  9. java - How to Create Immutable Class with List<String> Element in …

    Oct 21, 2019 · Before Update List ABC 101 [java, spring, hibernate, rest] After Update List ABC 101 [java, spring, hibernate, rest, Hibernate] why and how this new Course element added into the List as …

  10. java - How can we maintain Immutability of a class with a mutable ...

    A thread-safe immutable object is seen as immutable by all threads, even if a data race is used to pass references to the immutable object between threads. This can provide safety guarantees against …