دنبال کننده ها

۱۳۹۷ فروردین ۲۱, سه‌شنبه

Java conditional with arrays - Stack Overflow

[ad_1]



int[] d = 97, 98, 71, 50, 82;
if(d<=60)
System.out.println(x.length);



The purpose of this code is to print the number of students who passed this class (print values of 60 and above). In our case the output should be "5" but I have no idea how to achieve this. I tried a conditional statement but this seem rather difficult with the arrays being involved.



Any ideas? Should I try ArrayList?




[ad_2]

لینک منبع