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 Creating a Class

why am being told there is no return statement??

ok so I feel like this is completely correct but no matter what I type it tells me the ne error is that there is not a return statement for the } on line 6......whoever can explain the solution to this to me gets a cookie...........

PictureBook.java
public class PictureBook{


  public String mTitle() {

  }
}

1 Answer

Jon Kussmann
PLUS
Jon Kussmann
Courses Plus Student 7,254 Points

Hello,

It looks like you are stuck on part two of that exercise. It states "Now add a String member variable named mTitle. Make it public."

What you're attempting to do at the moment is create a method, not create a member variable.

It should look something like:

public String mTitle;

thanks Jon....i'm new to this and it looks like the verbiage is still confusing me a bunch....thanks for the help....again haha

Jon Kussmann
Jon Kussmann
Courses Plus Student 7,254 Points

No problem.

It takes a long time getting used to. :)