Created
March 16, 2020 16:29
-
-
Save bastienapp/7355db30bbd8dbd8850a0cd5ecf4b3a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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