[Solved] logical OR in Java not working?
[ad_1] Before you do anything check for an empty List or a 0 divisor. if(divisor==0||array1.isEmpty()){ return false; } Then you can check the list. for(Integer i: array1){ if(i%divisor!=0){ return false; } } Finally. return true; [ad_2] solved logical OR in Java not working?