There are no get and set commands in the Java language, so I guess you mean something different. Could you please elaborate? Are you asking about getter and setter *methods*?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
i think what he/she means is that the accessor and mutator methods..accessor methods, in your case..the get methods, allows you to get the data while the set methods, the mutator methods allows you to change the data
Getters and Setters are all about encapsulating data. In Java, we make instance variables private, which makes the data only directly accessible to the class, and we make the data accessible through public setter and getter method.
As we say, in Java, it's not polite to expose our privates.
He's my best friend. Not yours. Mine. You can have this tiny ad: