generateFibonacci

This commit is contained in:
Tim Tersch
2020-08-27 11:00:59 +02:00
parent 4a0ada84ac
commit 6aa09fd366

View File

@@ -314,7 +314,16 @@ public class Arrays {
* Für ein leeres Array wird 0 zurück gegeben.
*/
public int over( int[] pArray, int pValue ) {
return 0;
if (pArray == null || pArray.length == 0) {
return 0;
}
int count = 0;
for (int i : pArray) {
if (i > pValue) {
count++;
}
}
return count;
}
/**