I tried many times with different ways of initializing the fields, but always fail.
The recommendation from mentor shows that
The elements of the innerClasses array must be null. Initialization should only happen in the getTwoSolutions method.
But they seem to be satisfied already.
package com.codegym.task.task23.task2305;
/*
Inner
*/
public class Solution {
public InnerClass[] innerClasses;
public class InnerClass {
}
public static Solution[] getTwoSolutions() {
Solution[] result = new Solution[2];
for (int i = 0; i< result.length; i++) {
result[i] = new Solution();
result[i].innerClasses = new InnerClass[2];
}
return result;
}
public static void main(String[] args) {
}
}