mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
15 lines
280 B
Java
15 lines
280 B
Java
// "Replace loop with 'Arrays.fill()' method call" "true"
|
|
|
|
import java.util.Arrays;
|
|
|
|
public class Test {
|
|
|
|
public static int[] init(boolean b) {
|
|
int[] arr = new int[10];
|
|
if (b) {
|
|
arr = new int[]{1, 2, 3, 4, 5};
|
|
}
|
|
Arrays.fill(arr, 0);
|
|
return arr;
|
|
}
|
|
} |