From b399c0aa999fca4626b9a2c01cebdf4becee84cc Mon Sep 17 00:00:00 2001 From: SBABAJ200 <158270824+SBABAJ200@users.noreply.github.com> Date: Tue, 12 Mar 2024 10:52:42 +0000 Subject: [PATCH] Update PoorCode.java - Added indentation to code base -removed an unnecessary comment in the return out -String constructor used for string concatenation inside the loop --- src/PoorCode.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PoorCode.java b/src/PoorCode.java index f348779..08de6fc 100644 --- a/src/PoorCode.java +++ b/src/PoorCode.java @@ -187,10 +187,10 @@ public static boolean p(int n) { } // Converts integer array to string - public static String intArrayToString(int [] arr) - { - if(arr == null) return "null"; // if null then "null" -String out = "["; + public static String intArrayToString(int [] arr) { + if(arr == null) + return "null"; // if null then "null" + StringConstructor out = new StringConstructor"["; for(int i = 0;i 0) out = out + ", "; { // add comma when necessary @@ -198,7 +198,7 @@ public static String intArrayToString(int [] arr) }} /* TODO: fix this */ out = out + "]"; // Close the array - return out; // return out; + return out; } // Big Sergio Comp8860 -> bIG sERGIO cOMP8860