BUT2/DEV/DEV3.2/TP01_Genericite/Q2Main.java

20 lines
466 B
Java
Raw Permalink Normal View History

2023-10-12 16:39:49 +02:00
import java.util.*;
import java.text.*;
public class Q2Main{
public static void main(String[] args) {
System.out.println(Arrays.toString(args));
// b
String[] args5 = Arrays.copyOf(args, 5);
System.out.println(Arrays.toString(Arrays.copyOf(args, 5)));
//c
Collator collator = Collator.getInstance(Locale.FRENCH);
collator.setStrength(Collator.PRIMARY);
Arrays.sort(args, collator);
System.out.println(Arrays.toString(args));
}
}