What is Getter and Setter in java?
KyloRen314:
bro where did u get this question
Answers
Answered by
0
Getter and Setter Methods in Java. If a data member is declared "private", then it can only be accessed within the same class. No outside class can access data member of that class. If you need to access these variables, you have to use public "getter" and "setter" methods.
Answered by
0
Getter and Setter Methods in Java. If a data member is declared "private", then it can only be accessed within the same class. No outside class can access data member of that class. ... Getter and Setter's methods are used to create, modify, delete and view the variables values
Similar questions