Here you can find the source of toIntArray(String[] ss)
Parameter | Description |
---|---|
ss | a parameter |
public static int[] toIntArray(String[] ss)
//package com.java2s; public class Main { /**// ww w . j a v a 2 s. c o m * @param ss * @return */ public static int[] toIntArray(String[] ss) { int[] is = new int[ss.length]; for (int i = 0; i < ss.length; i++) { is[i] = toInt(ss[i]); } return is; } public static int toInt(String s) { try { return Integer.parseInt(s); } catch (NumberFormatException e) { return 0; } } }