Check out example codes for "java for loop add multiple declarations". It will help you in understanding the concepts better.

Code Example 1

All declarations must be initialized at the beginning
of a for loop and must be of the same type
Ex: for(int i = 0, k = 1, j = 23; boolean; post code)

Learn ReactJs, React Native from akashmittal.com