Convert a string to number
Anonymous
convert an entry from the array into a number using Integer.parseInt or Long.parseLong as appropriate. For example: String Dept_ID[] = request.getParameterValues("dept_id")); int[] ids = null; if (Dept_ID != null) { ids = new int[Dept_ID.length]; for (int index = 0; index < Dept_ID.length; ++index) { ids[index] = Integer.parseInt(Dept_ID[index]); } }
Check out your Company Bowl for anonymous work chats.