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 Packages

what does this chalenge want me to do <Let's create some code for the Example company. They own the domain example.com.>

Let's create some code for the Example company. They own the domain example.com. Place the BlogPost.java file in the proper package by using the package keyword.

Where and what is the proper package

com/example/BlogPost.java

Display.java
public class Display {

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

  }
}

1 Answer

Florian Stegemann
seal-mask
.a{fill-rule:evenodd;}techdegree
Florian Stegemann
Full Stack JavaScript Techdegree Student 22,660 Points

They want you to declare that BlogPost.java is part of a package. Package names correspond to the folder structure of a project and to guarantee that a package name is unique, they are usually based on domain names in reversed order.

For a domain like teamtreehouse.com the folder structure would look like com/teamtreehouse/Class.java and the package would be declared as seen in the snippet below:

package com.teamtreehouse;

Thanks so much