3

When I programmed with Android Studio, it seems to me that is a way to generate automatically the getter and the setter of my new java class.

Can anyone tell me how to do it?

Ian Gallegos
  • 524
  • 1
  • 9
  • 18

1 Answers1

5

Open the class you want, right click anywhere in the code and chose the Generate option:

enter image description here

Then chose what you are trying to generate: setters, getters or both:

enter image description here

Then select the fields you want, and you're done.

Isac
  • 1,834
  • 3
  • 17
  • 24