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

My code looks write, but the test won't let me through, I even tested it in workspace's and it compiles.....so idk

My code looks write, but the test won't let me through, I even tested it in workspace's and it compiles.....so idk

Keeps saying "Did you build a constructor...", yes I did, but it won't take it.

package com.teamtreehouse; import java.util.Date;

public class treet {

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

public treet(String author, String title, String body, String category, String description, Date creationDate){

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

}


public String getAuthor(){

  return mAuthor;

}

public String getDescription(){

  return mDescription;

}

public Date getCreationDate(){

  return mCreationDate;

}

}

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 String mDescription;
  private Date mCreationDate;

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

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

  }

}

3 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Russell;

I don't see anywhere in the directions in which it asks for a description field. Most of the time the challenges are rather explicit on what they want and if you put too much in, even if it is correct from a syntax standpoint, it won't let you pass. I believe that is the case here.

Ken

Did you tried to redo the challenge? I actually can't see any mistake in your code aswell...

You were right Ken. Not sure why I was adding it, but I am sure that when I did it the error message that was presented was worded in a way that suggested I needed a description.

Thanks Guys!