Java Java Data Structures Efficiency! Custom Serialization

Error: Non static method importFrom cannot be referenced from a static context

here is the main method in

    public static void main(String[] args) {
        SongBook songBook = new SongBook();
        KaraokeMachine machine = new KaraokeMachine(songBook);;
        System.out.println("Saving book....");

and here is the method in

   public void importFrom(String fileName) {
        try (
                FileInputStream fis = new FileInputStream(fileName);
                BufferedReader reader = new BufferedReader(new 
            String line;
            while((line = reader.readLine()) != null) {
                String[] args = line.split("\\|");
                addSong(new Song(args[0], args[1], args[2]));
        } catch (IOException ioe) {
            System.out.printf("Problems loading %s %n", fileName);

I can't figure out why I am getting this error? when I change importFrom to a static method it requires further methods being changed. It seems like importFrom should not need to be static but I can't figure out what else would cause this error.

1 Answer

Agh... figured it out right after I posted this. I capitalized SongBook when calling the method.