Answer the question
In order to leave comments, you need to log in
How to solve the problem with set(), get()?
Book: id, title, author(s), publisher, year of publication, number of pages, price, type of binding.
Create an array of objects. Display a list of books sorted by author.
Help really needed!!
Answer the question
In order to leave comments, you need to log in
Take out from where? If from the database, then look towards active record and data mapper (repository) - the latter is better. There are ready-made interfaces: JPA
Setters and getters of variables will not help you in any way, as they give access to the properties of your business entity (and generally make it a structure), but how they are filled is not a matter of this object (except for the Active Record pattern), exactly as well as the output of a collection of these objects, and definitely not sorting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question