Skip to content

Instantly share code, notes, and snippets.

@bastienapp
Created March 16, 2020 16:29
Show Gist options
  • Save bastienapp/7355db30bbd8dbd8850a0cd5ecf4b3a7 to your computer and use it in GitHub Desktop.
Save bastienapp/7355db30bbd8dbd8850a0cd5ecf4b3a7 to your computer and use it in GitHub Desktop.
package com.company;
class Movies {
public static void main(String[] args) {
String[] movies = {
"Indiana jones et le royaume du crane",
"Indiana Jones et la derniere croisade",
"Indiana Jones et le temple maudit"
}; // length : 3, i = 0
//actors[1][0]
String[][] actors = {
{"Harrison Ford", "Cate Blanchett", "Karen Allen"},
{"Harrison Ford", "Sean Connery", "Denholm Elliott"},
{"Harrison Ford", "Kate Capshaw", "Jonathan Ke Quan"}
};
for (int i = 0; i < movies.length; i = i + 1) {
System.out.println("Dans le film " + movies[i]
+ ", les principaux acteurs sont: " + actors[i][0]
+ ", " + actors[i][1] +", acteur3");
/*System.out.println(movies[i]);
System.out.println(actors[i][0]);
System.out.println(actors[i][1]);
System.out.println(actors[i][2]);*/
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment