I am working in BlueJ for my university course, and I have been set a basic assignment where we need the user to input certain information about a DVD, such as director, name, running time, etc.
I am coding in Java, and used Genio too. The following code is how I got and set the information within the variables;
public void getDVDInfo() {
//Ask for info
System.out.println("Please Enter the Film Info:");
System.out.println("Film Name: ");
System.out.println("Film Director: ");
System.out.println("Lead Actor/Actress: ");
System.out.println("Running Time: ");
}
public void setDVDInfo() {
//set user input to variables
filmName = Genio.getString();
director = Genio.getString();
leadActor = Genio.getString();
runTime = Genio.getInteger();
}
This all works according to the compiler I used within BlueJ, but when i coded the function to return the information to the user, like so;
public String seeDVDInfo() {
return filmName;
return director;
return leadActor;
}
public int seeRunTime() {
return runTime;
}
it came up with a compiler error at return director;
that is was an unreachable statement. i don't understand where this is coming from, it all looks right, can anyone help me?
Thanks in advance xx