title: Increment vs Decrement For loop and result is the same
body: <p>I'm trying to make a json object with the same order as the <code>inputNames</code> list.</p>
  
  <p>I tried this:</p>
  
  <pre><code>            JSONObject jsonInputs = new JSONObject();
              String[] params = tf.params.split("\\|");
              //get the input descriptions
              List&lt;TestInput&gt; inputNames = TestInput.getInputs(testCaseName);
              for (int i = (params.length - 1); i &gt;= 0; i--) {
                  jsonInputs.put(inputNames.get(i).getName(), params[i]);
              }
              jsonTest.put("inputs", jsonInputs);
  </code></pre>
  
  <p>and</p>
  
  <pre><code> JSONObject jsonInputs = new JSONObject();
              String[] params = tf.params.split("\\|");
              //get the input descriptions
              List&lt;TestInput&gt; inputNames = TestInput.getInputs(testCaseName);
              for (int i = 0; i &lt; params.length; i++) {
                  jsonInputs.put(inputNames.get(i).getName(), params[i]);
              }
              jsonTest.put("inputs", jsonInputs);
  </code></pre>
  
  <p><strong>And the result of the jsonInputs the same.</strong> It's the reverse order of <code>inputNames</code></p>
  
  <p>How do I make it stay in the order that is created?</p>