Quote (poodaH @ Apr 9 2014 05:46am)
Integer.parseInt(String) parses a string into an integer. If something goes wrong there, then you have a NumberFormatException because the string has an ill-formatted integer in it.
Knowing that, where would the exception be thrown from?
/e Also, you might want to change in.nextInt() to in.nextDouble()
Quote (m0hawk @ Apr 9 2014 05:48am)
declare your numElements int before the try / catch and put numElements = Integer.parseInt(args[0]); in the try/catch
thank you both for the help, I've fixed my issue =].