fork download
  1. // http://stackoverflow.com/questions/32563138/how-to-convert-values-stored-in-the-string-array-to-integer-array-in-java/32563208#32563208
  2.  
  3. public class Main {
  4. private String[] aa = { "70", "80", "99", "140", "150", "199", "200",
  5. "300", "349", "350", "400", "499", "500", "501", "900", "1000",
  6. "1100", "1200" };
  7.  
  8. public static void main(String[] args) {
  9. new Main().run();
  10. }
  11.  
  12. private void run() {
  13.  
  14. int[] bb = new int[aa.length];
  15. for (int i = 0; i < aa.length; i++) {
  16. bb[i] = Integer.parseInt(aa[i]);
  17. }
  18.  
  19. for (int b : bb)
  20. System.out.printf("%d ", b);
  21. System.out.println();
  22. }
  23.  
  24. }
  25.  
Success #stdin #stdout 0.11s 320512KB
stdin
Standard input is empty
stdout
70 80 99 140 150 199 200 300 349 350 400 499 500 501 900 1000 1100 1200