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 Packages

András Baranyai
András Baranyai
4,800 Points

Java Data Structures Challenge - Package keyword

I am having difficulties moving on to the next step of this challange. I have added the package com.example; on the first line yet it won't run and I am keep getting the same comments ("Remember use the package keyword on the first line")


package com.example;

public class Display {
  public static void main(String[] args) {
    // Your code here...


1 Answer

Justin Horner
Justin Horner
Treehouse Guest Teacher

Hello András,

I believe your code is correct to add the package at the first line, but the challenge is asking you to add the package in BlogPost.java. Once you've done that, your code should pass the challenge and you'll be able to move to the next step!

I hope this helps.