If, this, is really the method in your code:
public String seeDVDInfo() {
return filmName;
return director;
return leadActor;
}
Then, the problem is that a method is finished with the a return statement. It will exit the method with the provided value.
You have different ways to solve the issue, depending on the information you want to provide/use:
public String seeDirector() {
return director;
}
public String seeFilmName() {
return director;
}
public String leadActor() {
return director;
}
Taking into account that java is an OOP language, I would suggest creating a class Film
that contains/ encapsulates this info that can be returned. So actually it will look something like this:
public class Film {
private String director;
private String filmName;
private String leadActor;
public Film(String director, String filmName, String leadActor) {
this.director = director;
this.filmName = filmName;
this.leadActor = leadActor;
}
public String getFilmName() {
return filmName;
}
public void setFilmName(String filmName) {
this.filmName = filmName;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getLeadActor() {
return leadActor;
}
public void setLeadActor(String leadActor) {
this.leadActor = leadActor;
}
}