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 Override an inherited method

Can anyone check my code? Can't get it to work

Here is the error output I get when submitting my code:

JavaTester.java:69: error: illegal start of expression
      package com.example;
      ^
JavaTester.java:69: error: not a statement
      package com.example;
                 ^
JavaTester.java:71: error: illegal start of expression
import java.util.Date;
^
JavaTester.java:71: error: not a statement
import java.util.Date;
                ^
JavaTester.java:73: error: illegal start of expression
public class BlogPost {
^
5 errors

This is the code I entered at the end of the class:

  @Override
  public String toString(){
    return "Blogpost: " + mTitle + " by " + mAuthor;
  }

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Rajbie,

Your code does seem to be correct... :thumbsup:

But, there have been some issues with the Java challenges and the Code Checker engines. I'm sure the Support Team is working hard to fix the problem.

For the time being, I suggest continuing on with the course (if you'd like) by navigating over the challenge using the buttons in the progress bar above the video window.

Just make sure you come back later to complete the challenge so you receive full credit and the badge for the course. Hopefully everything gets up and going smoothly soon.

Keep Coding! :) :dizzy: