Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

Sai Krishna Katkam
PLUS
Sai Krishna Katkam
Courses Plus Student 1,946 Points

How does a beginner know what method to use and which class? Here, the instructor uses nextInt() from "Random" class!

Does a developer needs to have very good knowledge of that method, it's uses and it's respective class as well in order for it to use?

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! I would say that in general, it would depend on how much you need to generate something randomly. Try to keep in mind that programming isn't really about memorization, it's about solving problems. This is why we have documentation. No one is expected to know it all about any given language. Even if it were possible, it'd be highly inefficient and a waste of energy. Things change all the time. What you memorize today may or may not be valid a year from now. My advice is to concentrate on the idea and look up the details as you need them to solve your particular problem for your particular situation.

If you try and concentrate on the idea, then the details will come with repeated use.

Hope this helps! :sparkles: