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 a Simple Android App (2014) Improving Our Code Adding More Colors

Twinnie Ting
PLUS
Twinnie Ting
Courses Plus Student 2,441 Points

Why are we not importing the classes we created to class FunFactsActivity?

I noticed that we are using the classes we create - FactBook and ColorWheel in our FunFactsActivity, but we are not importing it initially?

Does android know those classes right away that why the FunFactsActivity can see it and use it anytime?

2 Answers

Jacob Bergdahl
Jacob Bergdahl
29,119 Points

EDIT: Ben's answer is better :)

Ben Deitch
STAFF
Ben Deitch
Treehouse Teacher

It's because FactBook and ColorWheel are in the same folder as FunFactsActivity. If we made a new folder and moved Factbook and ColorWheel into the new folder, then we would have to import them.