Skip to content

Instantly share code, notes, and snippets.

@Morzanne
Created May 9, 2019 14:38
Show Gist options
  • Save Morzanne/db9a6c704901b0d951d471e12a8c169d to your computer and use it in GitHub Desktop.
Save Morzanne/db9a6c704901b0d951d471e12a8c169d to your computer and use it in GitHub Desktop.
import java.util.Arrays;
public class Movies{
public static void main(String[] args){
String[] movies = {"Indiana Jones and the Temple of Doom","Raiders of the Lost Ark","Indiana Jones and the Last Crusade" };
String[][] actors = {{"Harrison Ford","Kate Capshaw","Jonathan Ke Quan"},{"Harrison Ford","Karen Allen","Paul Freeman"},{"Harrison Ford","Sean Connery","River Phoenix"}};
for (int i = 0; i < movies.length; i++){
System.out.println("In the movie: "+movies[i]+",the main actors are: "+Arrays.toString(actors[0+1]));
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment