这是我实现接口的尝试。
我收到以下错误
javac MyCollection.java
./au/edu/uow/Collection/DVDAlbum.java:6: cannot find symbol
symbol: class Album
public class DVDAlbum implements Album{
这是超级班
package au.edu.uow.Collection;
public interface Album {
String getMediaType();
String getTitle();
String getGenre();
}
这是子类
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;
}
}
http://www.javabeginner.com/learn-java/java-abstract-class-and-interface 这是我使用的参考,但它对我不起作用。