Data classes are intended for types that are meant to be data containers and nothing more. Code readability is important to me and, most likely, to anyone who reads this book. When you open a source file, you really want to be able to quickly grasp what the code does. When it comes to a POJO (short for Plain Old Java Object), I am sure you would very much like to avoid having to write the code for setters and getters if all they do is return a value. Furthermore, the constructor's code body is bold in almost every case; it just takes the incoming parameters and assigns them to the concerned fields after it performs any validation that is required. This is where data classes could help you. If you have coded in Scala, you will already be accustomed to the case-class construct, and I am pretty sure the idea of even having to press a shortcut key...
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia