forked from IF-LK-2020/array
generateFibonacci
This commit is contained in:
@@ -314,8 +314,17 @@ public class Arrays {
|
||||
* Für ein leeres Array wird 0 zurück gegeben.
|
||||
*/
|
||||
public int over( int[] pArray, int pValue ) {
|
||||
if (pArray == null || pArray.length == 0) {
|
||||
return 0;
|
||||
}
|
||||
int count = 0;
|
||||
for (int i : pArray) {
|
||||
if (i > pValue) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Erstellt ein Integer-Array mit den ersten <var>pNumberOfElements</var>
|
||||
|
||||
Reference in New Issue
Block a user