vikas pal8,545 Points
Why we use get?
Why we use the get for making new method is it a naming convension?
Livia GaleazziJava Web Development Techdegree Graduate 19,906 Points
Yes, naming methods getVariable and setVariable when those methods are used to get or set an instance variable is a naming convention. You don't have to name your methods this way, but it helps other developers understand at a glance what the method is for.