0

variables within a class private

why its not the rule?

19th Dec 2019, 1:25 PM
Lenyuk Michal
2 Respuestas
+ 1
It is the rule. You must have heard about encapsulation, so exposing every variable of the class is not recommended because you do not want every user to alter the value of a program that you created. Edit: Need not be private at all times but it is a good practice.
19th Dec 2019, 1:37 PM
Avinesh
Avinesh - avatar
En tendencia hoy
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes