How would you make a Java class immutable, and what are the key differences between LinkedList and ArrayList?
Use the supplied reference tables to return a concise structured answer covering both topics. Include only the two requested collection types and all applicable immutability guidance.
collection_name, access_characteristic, insertion_characteristic, preferred_use, and immutability_guidance.collection_name alphabetically.immutability_guidance.| Column | Type | Description |
|---|---|---|
| collection_idPK | INT | Unique collection reference |
| collection_name | VARCHAR(50) | Java collection implementation name |
| access_characteristic | TEXT | Characteristic describing indexed access |
| insertion_characteristic | TEXT | Characteristic describing insertion and removal behavior |
| preferred_use | TEXT | Typical use case for the collection |
| Column | Type | Description |
|---|---|---|
| rule_idPK | INT | Display order for the immutability rule |
| rule_text | TEXT | Guidance for implementing an immutable Java class |
| applies_to | VARCHAR(20) | Scope of the guidance |