Alright, I've been working on this one line for awhile, can't quite get it. I need to read all the characters after the "," (comma), ending at the end of the line. I'm guessing I'm just making a simple mistake. Can anyone help me out?
blocksArray [numBlocks][1] = Integer.parseInt(line.substring (line.indexOf(","),line.length()));
I thought substrings went something like this... line.substring (START,END)? Can I not use the length method for the end space?
I keep getting this error after I run the program..
Exception in thread "main" java.lang.NumberFormatException: For input string: ","
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at importCookies.main(importCookies.java:31)