Me again!![]()
I've got an input from a single string that is separated by "&" so I'm using a tokenizer to split it up. The problem is that two of the inputs in the string don't want to be strings, one must be double and the other int.
I've currently got:
Code:... private int quantity; StringTokenizer st = new StringTokenizer(order, "&"); while (st.hasMoreTokens()) { dateRaised = (st.nextToken()); ... ... quantity = Integer.parseInt(st.nextToken()); }
but the output for the int is 0. Where am I going wrong?




Reply With Quote