title: How can I convert a string with integers to array with integers in java?
body: <p>I want to convert a string with integers to array with integers in Java.
  How i can do this?I have an array with strings.Every string is integers.
  I want to access every string with a click from a button.</p>
  
  <pre><code> String[] INT_ARRAY={
  
          //0
          "250,125,20,20,20,40,20,20,20,40,20,20,20,2500",
  
          //1 
          "233,63,28,63,29,63,28,16,28,17,26,63,29,17,26,16....
                       ........
  
                   }
  
     public void onClick(View v) {
  
          counter++;
          String IntString = INT_ARRAY[counter];
  
                      String[] parts = IntString.split(",");
  
  
            final int[] A = new int[parts.length()];
  
            for(int i=0; i&lt;parts.length(); i++){
  
              A[i] = Integer.parseInt(parts(i));
  
                              Toast.makeText(getApplicationContext(),String.valueOf(A[i]), Toast.LENGTH_SHORT).show();
  
          }
  
    }
  </code></pre>