Question: How would you use getter and setter methods to use encapsulation in JAVA? Give an example code to explain your answer.
How would you use getter and setter methods to use encapsulation in JAVA? Give an example code to explain your answer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
