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.

Java Java Data Structures Getting There Class Review

NAJEEBULLAH KHAN
NAJEEBULLAH KHAN
2,967 Points

i dnt know why its asking me to make contructor while i have alreaaaaaady done so

why

com/example/BlogPost.java
package com.example;


import java.util.Date;

public class BlogPost {

  private String mAuthor;
  private String mTitle;
  private String mBody;
  private String mCategory;
  private Date mCreationDate;

  public BlogPost (String member, String author, String title, String body, String category, Date creationDate)
  {

    mAuthor = author;
    mTitle = title;
    mBody = body;
    mCategory = category;
    mCreationDate = creationDate;

  }
}
Jason Anders
Jason Anders
Treehouse Moderator 145,624 Points

NAJEEBULLAH KHAN

Multiple posts have been deleted for this question. Please refrain from posting multiple threads for the same topic in the Community.

Thank you.

Jason ~Treehouse Community Moderator

1 Answer

Oszkár Fehér
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Oszkár Fehér
Treehouse Project Reviewer

Hi Khan Your code looking great. Your constructor it's almost ok just missing a crucial element:

this.mAuthor = author;

and for the rest of the variables to. the

this.

keyword needed to initialize your variables Also the

String member

variable in the constructor it's not needed. I hope this will help you out. Happy coding