creating a program about user asked to enter a number and enters 0 to stop, then calculates the sum of numbers entered, the average, the length of positive numbers and negative numbers entered by the user in java

Java
for(i = 0; i < Size; i++)
{
	if(a[i] >= 0)  {
		positiveCount++;
	}
	else  {
		negativeCount++;
	}
}
Source

Also in Java: