Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi Pankaj, Nice Tutorials. I think in the above example for processing all positive elements, we are assigning the allPositive value to true at line 33. I think its unnecessary. As we are assigning its value to true in the beginning of each iteration. Thanks.
- Raghuveer Kurdi
It is a “go to” statement, which was recommended to avoid in your code. I have not seen these statements in professional code in years?? Not sure we should bring them back??
- Janice
This whole code: if (allPositive) { // process the array System.out.println("Processing the array of all positive ints. " + Arrays.toString(intArr[i])); } allPositive = true; is unnecessary. I had to double check in my own IDE, to make sure. I usually like your articles, so this one felt like a letdown. You better fix it up. No need for a conditional in the outer loop, because that conditional would only get reached if the array is positive.
- Noone