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 Blog Reader Android App Getting Data from the Web Moving Work from the Main Thread to an AsyncTask

Oliver Acevedo
Oliver Acevedo
4,338 Points

Having trouble understanding Classes and Methods. Do I need to get a better understanding before going on?

I'm in the Blog Reader app and learning how to connect it to the internet in order to retrieve information. Following along just fine but I feel so lost when the instructor talks about Classes and Methods. I have an idea of what they are but not enough to fully understand what he's talking about or why he does certain things.

Is this something I should understand at this point? I'm wondering whether I need to stop and review everything until I get it before proceeding or if this will just make more sense as I continue with the lessons.

3 Answers

Hi Oliver,

It's completely fine to be puzzled at start. In fact that's how it should be. In fact both these terms classes and methods form the core. It will be fine to refer other materials in terms of books, videos, etc. but they'll probably be using a similar language.

To make it a little easy let me just state the following

  • everything in Android is based on classes. So what ever you do in Android is always happening within a class. Period.
  • Inside classes we have class members i.e. code or method that defines what will happen and data that defines ** who will be affected** . Straight forward.
  • So by convention methods exist within classes.

This is just the surface. But don't pause your learning for you will get intimidated when you cross reference and figure there is more to learn. Read a little about Java (preferred) or any OOP language each day. Just a topic a day would suffice. In a week it will start making sense.

I hope this helps.

-Gunjeet

Oliver Acevedo
Oliver Acevedo
4,338 Points

Thank you both for your answers. I was hoping to hear that. I've heard that it's a difficult topic to grasp at first, just wasn't sure if I'm at a point where I should have already grasped it. I'll keep at it and also supplement treehouse with other videos and readings. I'm really enjoying this stuff, just can't wait to be able to make enough sense of it to write my own code!

Daniel Hartin
Daniel Hartin
18,106 Points

Hi Oliver

I was totally bamboozled by classes when first introduced to them. I was told at every turn that they are simply a blueprint for an object but still couldn't grasp it!. My advice would be to persevere with the track on treehouse, you'll probably find you have learnt more than you thought! but by all means cross-reference the material with other sources to cement your knowledge if your finding it too tough.

Oliver, You are experiencing the same thing that many of us do when it comes to classes and methods. The answer that really helped me was to think of a Class as a thing and a Method as an action that the thing does. Example: Class = Dog Method = Jump Method = Bark

By all means persevere as Daniel suggested, these items will become more clear over time.