0

次のエラーが表示されます

javac MyCollection.java ./au/edu/uow/Collection/CollectionFactory.java:109: 
cannot access au.edu.uow.Collection.DVDAlbum
bad class file: ./au/edu/uow/Collection/DVDAlbum.java
file does not contain class au.edu.uow.Collection.DVDAlbum
Please remove or make sure it appears in the correct subdirectory of the classpath.
                    DVDAlbum dvd = new DVDAlbum(tempTitle,tempGenre, tempDirector, tempPlot);

次のコードから

package au.edu.uow.Collection;

import java.util.ArrayList;
import java.io.*;

public class CollectionFactory{
        DVDAlbum dvd = new DVDAlbum(tempTitle,tempGenre, tempDirector, tempPlot);
}

これは DVDAlbum の実装です

import au.edu.uow.Collection.Album;

public class DVDAlbum implements Album{

    private String Title;
    private String Genre;
    private String Director;
    private String Plot;
    private String MediaType;

    public DVDAlbum(String TempTitle, String TempGenre, String TempDirector, String TempPlot){
        Title = TempTitle;
        Genre = TempGenre;
        Director = TempDirector;
        Plot = TempPlot;
    }
    String getMediaType(){
        return MediaType;
    }
    String getTitle(){
        return Title;
    }
    String getGenre(){
        return Genre;
    }
}

どんな助けでも大歓迎です

4

1 に答える 1

1

パッケージDVDAlbum宣言がないようです。追加:

package au.edu.uow.Collection;
于 2012-08-25T12:48:26.320 に答える