Wednesday, 31 August 2016

How to define immutable class


for protecting shared data, it is a way to hold it in an immutable class.

how to create an immutable class

(1) Having no setters.
(2) private fields, and make it final; so it will be init. only once.
(3) final class;

No comments:

Can Jackson Deserialize Java Time ZonedDateTime

Yes, but must include JSR310. Thus ZonedDateTime can be deserialized directly from JSON response to POJO field. <dependency> <g...