title: java : get computed values outside loop
body: <p>I do some calculation inside for loop  and when I println values inside the loop, I got the expected values,
  now, I need also that these values will be available outside loop and not only get the latest value.</p>
  
  <p>example : </p>
  
  <pre><code>String[][] matrix = { { "1", "2", "3" } };
  
      String[] y= { "TEST" ,"BUG"};
      int a = 0;
      for (int i = 0; i &lt; y; i++)
      {
  
        for (int j = 1; j &lt; 4; j++)
        {
  
         int value = Integer.parseInt(matrix[i][j - 1]);
  
          System.out.println(value ); //this is OK it print me 3 values
        }
      }
  System.out.println(value );  //it print me only third value
  </code></pre>
  
  <p>I would like that the value 1,2,3 will be also available outside loop </p>