Here you can find the source of convertIntfwl(String[] idArray)
Parameter | Description |
---|---|
idArray | a parameter |
public static int[] convertIntfwl(String[] idArray)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w .j a va 2 s . c om*/ * convert idArray to []. 1,2,3,4 --> [1,2,3,4] catch exception add by fwl * * @param idArray * @return */ public static int[] convertIntfwl(String[] idArray) { int[] desArray = new int[idArray.length]; for (int i = 0; i < desArray.length; i++) { try { desArray[i] = Integer.parseInt(idArray[i]); } catch (NumberFormatException e) { desArray[i] = 0; } } return desArray; } }