Created
March 21, 2020 14:13
-
-
Save GravenilvecTV/9358b0a216cb322438739ea1471daff9 to your computer and use it in GitHub Desktop.
JOUR 2 - JAVA - Magasin de jouets - Niveau 1
This file contains 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 exo2; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
public class Main { | |
public static void main(String[] args) { | |
List<String> jouets = new ArrayList<>(); | |
jouets.add("Scrubble Deluxe"); | |
jouets.add("Lup Garou"); | |
jouets.add("Zebre Figurine"); | |
jouets.add("Ozobot Evo"); | |
jouets.add("Araignée Peluche"); | |
jouets.add("Ligo Start Wars"); | |
jouets.add("Bakogan Battle Pack"); | |
// Afficher les jouets | |
for (String jouet : jouets) { | |
System.out.println(jouet); | |
} | |
// Trier par ordre alphabetique | |
Collections.sort(jouets); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Merci beaucoup Graven tu fait du bon boulot !!! ♥