+ 12
What exactly is the purpose of encapsulation?
Can you give a relevant use in a program as an example ?
7 Réponses
+ 14
Where are get and set methods used?
+ 9
Thanks for the answer, JavaBobbo !
+ 3
The get method is used to return the value and the set method is used to set the value later on in your main method. There is comments in the code read it and you will understand👍
+ 2
It is when you use get and set methods, i got a code which explain it:
https://code.sololearn.com/cpAdKz68c2j5/?ref=app
+ 1
You are welcome👍
0
I will say it's for identification and easy access