Computer Science, asked by suyash3715, 10 months ago

what is getter and setter in java​

Answers

Answered by LoyelKashyap
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.

Mark my answer as brainliest if it helped you out.....

suyash3715: no
LoyelKashyap: Then what's the answer?
suyash3715: another name of pure function is getter and impure function is setter
suyash3715: but i want the exact difference
Similar questions