瀏覽代碼

final commit

De'Jon Johnson 5 年之前
父節點
當前提交
c978726189
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      src/main/java/rocks/zipcode/io/quiz3/arrays/SquareArrayAnalyzer.java

+ 4
- 4
src/main/java/rocks/zipcode/io/quiz3/arrays/SquareArrayAnalyzer.java 查看文件

@@ -7,12 +7,12 @@ package rocks.zipcode.io.quiz3.arrays;
7 7
 public class SquareArrayAnalyzer {
8 8
     public static Boolean compare(Integer[] input, Integer[] squaredValues) {
9 9
 
10
-        Integer[] squaredArray = new Integer[input.length];
10
+        Integer[] newArray = new Integer[input.length];
11 11
         for (int i = 0; i < input.length; i++) {
12
-            squaredArray[i] = input[i] * input[i];
12
+            newArray[i] = input[i] * input[i];
13 13
         }
14
-        for (int i = 0; i < squaredArray.length; i++) {
15
-            if (squaredArray[i] == squaredValues[i]) {
14
+        for (int i = 0; i < newArray.length; i++) {
15
+            if (newArray[i] == squaredValues[i]) {
16 16
                 return true;
17 17
             }
18 18
         }