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 Spring Basics Modeling, Storing, and Presenting Data Create a POJO

Not understanding this error message. "Bummer: There is something wrong with your package declaration."

Not understanding why this error message occurs. I did everything the challenge asked.

com/teamtreehouse/contactmgr/model/Contact.java
public class Contact{

  private int id;
  private String firstName;
  private String lastName;
  private String email;




  public int getId(){
    return id;
  }

  public void setId(int id){
    this.id = id;
  }



  public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String name) {
        this.firstName = name;
    }

  public String getLastName() {
        return lastName;
    }

    public void setLastName(String name) {
        this.lastName = name;
    }


  public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

}

1 Answer

Michael Sraj
Michael Sraj
23,188 Points

So I checked it out. Even though it doesn't say it in the instructions, it wants you to declare the package that your POJO belongs to. So you would add:

package com.teamtreehouse.contactmgr.model;

This declares the package that's displayed above where you enter in your code.