Skip to content

Instantly share code, notes, and snippets.

@simbld
Created April 24, 2024 20:37
Show Gist options
  • Save simbld/9f44925d07c7d3c1f39046165d6ae62c to your computer and use it in GitHub Desktop.
Save simbld/9f44925d07c7d3c1f39046165d6ae62c to your computer and use it in GitHub Desktop.
Movies.java
package com.wildcodeschool;
public class Movies {
public static void main(String[] args) {
String[] movieTitles = {
"Indiana Jones and the Kingdom of the Crystal Skull", "Indiana Jones and the Last Crusade", "Indiana Jones et le Temple maudit"};
String[][] movieActors = {
{"Harrison Ford", "Karen Allen", "Paul Freeman"},
{"Harrison Ford", "Kate Capshaw", "Amrish Puri"},
{"Harrison Ford", "Sean Connery", "Alison Doody"}
};
for (int i = 0; i < movieTitles.length; i++)
System.out.println("Dans le film " + movieTitles[i] + ", les principaux acteurs sont : " + String.join(", ", movieActors[i]));
}
}
// Dans le film Indiana Jones and the Raiders of the Lost Ark, les principaux acteurs sont : Harrison Ford, Karen Allen, Paul Freeman
// Dans le film Indiana Jones and the Temple of Doom, les principaux acteurs sont : Harrison Ford, Kate Capshaw, Amrish Puri
// Dans le film Indiana Jones and the Last Crusade, les principaux acteurs sont : Harrison Ford, Sean Connery, Alison Doody
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment