From: Jérôme Benoit Date: Sun, 11 Feb 2018 13:47:50 +0000 (+0100) Subject: "else if" logic cleanup. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9f6084eae3580af1d1878008a4563ba444587f56;p=TP_POO.git "else if" logic cleanup. Signed-off-by: Jérôme Benoit --- diff --git a/Entiers/Entiers.java b/Entiers/Entiers.java index 0c813d9..fe92652 100644 --- a/Entiers/Entiers.java +++ b/Entiers/Entiers.java @@ -52,7 +52,7 @@ class Entiers { int middle = (first + last) / 2; if (value == int_array[middle]) return middle; - if (value > int_array[middle]) + else if (value > int_array[middle]) return binarySearch((middle + 1), last, value); return binarySearch(first, (middle -1), value); }