Skip to content

Instantly share code, notes, and snippets.

@Devcodpanda
Created May 10, 2020 16:44
Show Gist options
  • Save Devcodpanda/f9179a05c8ca859b5bf79fc2f88e22c0 to your computer and use it in GitHub Desktop.
Save Devcodpanda/f9179a05c8ca859b5bf79fc2f88e22c0 to your computer and use it in GitHub Desktop.
Java 4 - Tableaux et itération
public class Movies {
public static void main(String[] args) {
String[] nameMovies = { "Indiana Jones and the Kingdom of the Crystal Skull",
"Indiana Jones and the Last Crusade", "Indiana Jones and the Temple of Doom" };
String[][] mainActors = { { "Harrison Ford", "Cate Blanchett", "Karen Allen" },
{ "Harrison Ford", "Sean Connery", "Denholm Elliott" },
{ "Harrison Ford", "Kate Capshaw", "Jonathan Ke Quan" } };
for (int i = 0; i < nameMovies.length; i++) {
System.out.println("In the movie " + nameMovies[i] + ", the main actors are : " + mainActors[i][0]
+ ", " + mainActors[i][1] + ", " + mainActors[i][2] + ".");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment