From e9a380389779259bc249d4f60da33e84b19f814d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Mon, 29 Nov 2021 07:51:10 +0100 Subject: [PATCH] --- .../C082_Tableaux/Exercice1.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/C08_Structures_de_donnees/C082_Tableaux/Exercice1.java diff --git a/src/C08_Structures_de_donnees/C082_Tableaux/Exercice1.java b/src/C08_Structures_de_donnees/C082_Tableaux/Exercice1.java new file mode 100644 index 0000000..073f5b6 --- /dev/null +++ b/src/C08_Structures_de_donnees/C082_Tableaux/Exercice1.java @@ -0,0 +1,19 @@ +package C08_Structures_de_donnees.C082_Tableaux; + +public class Exercice1 { + public static void main(String[] args) { + + int[] foo = {10, 11, 12}; + for (int i = 0; i < foo.length; i++) { + System.out.println(foo[i]); + } + + String[] bar = new String[3]; + bar[0] = "Hello"; + bar[1] = bar[0]; + for (String string : bar) { + System.out.println(string); + } + + } +}