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 trialRobert Schank
9,398 PointsPublic 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
6,135 PointsSina Maleki
6,135 PointsHi 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