1 つ以上のループステートメントを含むメソッドを報告します。

例:

以下のメソッドは 2 つのループを含んでいるため、報告の対象になります。


  void methodWithTwoLoops(int n1, int n2) {
    for (int i = 0; i < n1; i++) {
      System.out.println(i);
    }

    int j = 0;
    while (j < n2) {
      System.out.println(j);
      j++;
    }
  }

以下のメソッドもネストしたループを含んでいるため、報告の対象になります。


  void methodWithNestedLoop(int n1, int n2) {
    for (int i = 0; i < n1; i++) {
      for (int j = 0; j < n2; j++) {
        System.out.println(i + j);
      }
    }
  }