An immutable class can't be changed. To make a class immutable, it must be final and all the fields must be private and final. Method that can modify the state are not allowed and references of any internals are inaccessible.

This is an immutable class:

public final class Product {

	private final String name;
	private final int code;
	private final Collection<Integer> ingredientIds;

	public Product(String name, int code, Collection<Integer> ingredientIds) {
		this.name = name;
		this.code = code;
		this. ingredientIds = ingredientIds;
	}