title: What is temp and what is the use of temp in java?
body: <p>I am getting started to learn Java and I wrote a simple array example program,</p>
  
  <pre><code>public class ExampleArray {
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          int a[] = {10, 20, 30, 40, 50};
          System.out.println(a[2] + " " + a[4]);
          for (int temp : a) {
              System.out.println(temp);
          }
      }
  }
  </code></pre>
  
  <p>This is the output:</p>
  
  <pre><code>30 50
  10
  20
  30
  40
  50
  </code></pre>
  
  <p>It prints all the values from an array.</p>
  
  <p>May I know, what is the use of <code>temp</code> in Java?</p>
  
  <p>Can anyone explain this keyword please?</p>