Skip to content

Instantly share code, notes, and snippets.

@Morzanne
Created May 13, 2019 07:17
Show Gist options
  • Save Morzanne/8afa4bfd0019ef75b2ce3688e31aa238 to your computer and use it in GitHub Desktop.
Save Morzanne/8afa4bfd0019ef75b2ce3688e31aa238 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[i]));
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment