To prevent other classes from directly accessing the properties of a class, you can code them as private. Then, to make them available to other classes, you can code

To prevent other classes from directly accessing the properties of a class, you can code them as private. Then, to make them available to other classes, you can code



Answer: public methods to set and get their values


Learn More :