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 trialLloyd McCluskey
11,073 PointsHelp with forum exercise
Here is my code, I have not idea why I get an error:
public class ForumPost {
private User author;
private String title;
private String description;
// TODO: add a constructor that accepts the author, title and description
Public ForumPost(User author, String title, String description) {
this.author = author;
this.title = title;
this.description = description;
}
public User getAuthor() {
return author;
}
public String getTitle() {
return title;
}
public String getDescription() {
return description;
}
}
Please help
1 Answer
Safet Garic
14,469 PointsIn the constructor public is written with a capital P it should be with a lowercase. That is probably wrong in the code.
Lloyd McCluskey
11,073 PointsLloyd McCluskey
11,073 PointsThank you!