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

SongBook.java will not compile

Hi Friends;

I am working through the Karaoke MVP project in Java. I can not get the class SongBook.java to compile. The SongBook class calls the Song Class. I get a 'Can not find symbol error' pointed at the Song Class.

package com.johnson.model;

import java.util.List;
import java.util.ArrayList;
import com.johnson.model.Song;

public class SongBook {
  private List<Song> mSongs;

  public SongBook(){
    mSongs = new ArrayList<Song>();
  }

My assumption is that this has something to with how I structured my package. But both classes are in the model directory.

I don't see an option to include images. I would like to include a screenshot of my directory. I apologize for leaving that out.

Mihailo Jakovljevic
Mihailo Jakovljevic
9,259 Points

If this is your whole class you are missing the second }. You opened one for class and one for Constructor, but you closed only one. If it's not that than i'm not sure what the problem is.

Justin Horner
Justin Horner
Treehouse Guest Teacher

Hello Brooks,

If you're using Treehouse Workspaces, would you mind creating a snapshot of the Workspace to share with us?

1 Answer

I am actually stuck on how add a screen shot to this post. I don't see any native way to do that.