From dbd88e5af7baed191e7ea08ecdfd651541d76052 Mon Sep 17 00:00:00 2001 From: Meutel Date: Thu, 30 May 2019 21:38:03 +0200 Subject: [PATCH] Affichage tableau int --- utils/Utils.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/utils/Utils.java b/utils/Utils.java index 8626d5c..6d9636f 100644 --- a/utils/Utils.java +++ b/utils/Utils.java @@ -18,6 +18,18 @@ public class Utils { } System.out.println(); } + public static final void afficherTabInt(int... args) { + if (args == null) { + System.out.println("null"); + } else { + String str = Arrays.stream(args) + .boxed() + .map(i -> i+"") + .collect(Collectors.joining(" ")); + System.out.println(str); + } + System.out.println(); + } public static int lireEntier() { try (Scanner reader = new Scanner(System.in)) {