or() finished

This commit is contained in:
artem.didytschuk 2020-08-31 22:46:30 +02:00
parent 106121a020
commit 1be004f517
1 changed files with 9 additions and 1 deletions

View File

@ -197,7 +197,15 @@ public class Arrays {
* Für ein leeres Array wird <code>false<code> zurück gegeben.
*/
public boolean or( boolean[] pArray ) {
return true;
if( pArray.length == 0 ) {
return false;
}
for(int i=0;i<pArray.length;i++){
if(pArray[i]== true){
return true;
}
}
return false;
}
/**