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 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")

com/example/BlogPost.java

Display.java
package com.example;

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

  }
}

1 Answer

Justin Horner
STAFF
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.