Java Community | Help. Code. Learn.JC|HCL
Java Community | Help. Code. Learn.โ€ข3y agoโ€ข
9 replies
dghf

Is this correct?

Is this correct?
public static Int positiveInts (Int[] n)
{
int noOfPositive = 0;
for(int i = 0; i < n.length; i++){
if( n[i].lessThan(0)) break; else (noOfPositive++)}
return noOfPositive;
}
Was this page helpful?