Java Java Data Structures Efficiency! Building the Model

javac: file not found: nothing works

I know this has already been answered here, but the solution didn't work for me :/ It doesn't matter where I drop (com or teamtreehouse folder) it doesn't work either way. Here's my snapshot... I'd be grateful for a helping hand in this...

1 Answer

Hello Lena4592,

I'm looking through your code now and found a couple of mistakes. I added comments to help you out. Otherwise, you did great! Keep up the work!

Hope this helps!


package com.treehouse.model; // Not the correct package 'teamtreehouse'

public class Song {
  private String mArtist;
  private String mTitle;
  private String mVideoUrl;

  public Song(String artist, String title, String videoUrl) {
    mArtist = artist;
    mTitle = title;
    mVideoUrl = videoUrl;

  public String getTitle() {
    return mTitle;

  public String getArtist() {
    return mArtist;

  public String gerVideoUrl() {
    return mVideoUrl;  

  public String toString() {
    return String.format("Song: %s by %s", mTitle, mArtist);



package com.teamtreehouse.model;

import java.util.List;
import java.util.ArrayList;

public class SongBook {
  private List<Song> mSongs;

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

  public void addSong(Song song) {

  public int getSongCount() {
    return mSongs.size();


import com.teamtreehouse.model.Song;
import com.teamtreehouse.model.Songbook; // Remember to camal case. Java is a case sensitive language. Look at your file name. 

public class Karaoke {

  public static void main(String[] args) {
    Song song = new Song(
      "Michael Jackson",
      "Beat It",
    SongBook songBook = new SongBook();
    System.out.printf("Adding %s %n", song);
    System..out.printf("There are %d songs. %n", songBook.getSongCount());

Thank you so much Xavier! I have not noticed that! Everything works beautifully now :)