結果 : how can encapsulation be used to create immutable classes in java provide an example