0
Array length?
Fill in the blank to retrieve a number of elements in an array called "test"
3 ответов
+ 1
public class Program
{
public static void main(String[] args) {
int[] test = {5,6,7,8};
int counter = 0;
for (int i = 0; i < test.length; i ++){
if (test[i] != 0){
counter ++;
}
}
System.out.println (counter );
}
}
+ 1
Appreciate.
0
no problem 👍