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 Android Lists and Adapters (2015) Updating the Data Model Introducing JSONArray

Robert Schank
Robert Schank
9,398 Points

Public method getHourlyForecast() in the Forecast class?

Why do we create a new getHourlyForecast() method in the MainActivity when one is already in the Forecast class? I believe it even has the same return and input parameters

Sina Maleki
Sina Maleki
6,135 Points

Hi buddy The getHourly() method in the Forecast class is called "Getter" and it just used for retrieved data from the object. but the getHourlyForecast() method in the MainActivity is for putting data in the object by "Setter" method. As you already know, getters and setters are just for put and pull data from out object. but how these values creating and processing are in the MainActivity. Best