F
F
Flasher2014-06-29 18:52:30
Java
Flasher, 2014-06-29 18:52:30

How to use objects as parameters?

Explain in a simple way the topic of using objects as parameters using simple examples + what is it for?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-06-29
Protko @Fesor

explanation with a simple example
In short, if you have methods that take several parameters as input, and some kind of validation is needed for the parameters, then it is more convenient to create a class that encapsulates all this goodness in itself, and the methods will accept an instance of this class and take values ​​from there without worrying about their validity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question