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

Java Java Data Structures - Retired 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,860 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