Java Array Convert to convertArray(String[] str)

Here you can find the source of convertArray(String[] str)

Description

convert Array

License

LGPL

Declaration

public static int[] convertArray(String[] str) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static int[] convertArray(String[] str) {
        try {//w  w w .j av  a 2  s  .  c  o m
            int[] strs = new int[str.length];
            for (int i = 0; i < str.length; i++) {
                strs[i] = Integer.parseInt(str[i]);
            }
            return strs;
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. arrayToSVMLightString(int[] array)
  2. arrayToUpper(String[] values)
  3. arrayWithoutFirstsElement(final String[] array, final int elementsToRemove)
  4. convertArray(byte[] a)
  5. convertArray(Object columns[], int minLength)
  6. convertArray2String(String[] sources)
  7. convertArrayIndexToShipLetter(int i)
  8. convertArrayToCSVString(String[] s)
  9. convertArrayToInteger(String[] input)