Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build an Interactive Story App (Retired) The Model-View-Controller Pattern Implementing the Data Model

Niyamat Almass
Niyamat Almass
8,176 Points

What is the benefit of getter and setter method?

What is the benefit of getter and setter.what is the work of "getter and setter method" , and why we use it, and lastly what is getter and setter method? Please somebody explain it?

And please someone explain what is constructor?

I am confused.

1 Answer

Niyamat,

These questions are part of basic Java knowledge and involve a lot of explanation. If you find yourself confused then I recommend you take the Java courses to learn or perhaps to review some of your Java knowledge. Without a good understanding of Java, the Android track will be very difficult. If after having gone through the Java course and you still have questions about what a constructor, property, and getter/setter method is, then please feel free to reach out to me and I will help you the best I can.