0

I'm new to Java and i want to know what is the purpose of Get and Set functions, and i want to know where it is being used. Please answer clearly because i'm still new to java field. Thank you a lot for answering my simple question.

Java_NewBie
  • 93
  • 1
  • 10
  • A get method returns a value. A set method changes the internal state of the object it is being called on (i.e. changing the value of an integer). – Azar Nov 05 '14 at 20:13
  • They are simple conventions designed to make it easier to tell when you get a value from a method or set a value to a method – MadProgrammer Nov 05 '14 at 20:15

0 Answers0