aspose file tools*
The moose likes Beginning Java and the fly likes Problem with parseInt and entering in array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with parseInt and entering in array" Watch "Problem with parseInt and entering in array" New topic
Author

Problem with parseInt and entering in array

Lio Liov
Ranch Hand

Joined: Mar 21, 2012
Posts: 33
I am trying to run this code and I have problem with adding integers in the ArrayList
Could you tell me why
The exception happens on the last line


Michal Plutynski
Greenhorn

Joined: Mar 01, 2012
Posts: 14

Could you give and example of file you are using (openFile.txt)?
Lio Liov
Ranch Hand

Joined: Mar 21, 2012
Posts: 33
This is the file:
ram size:111
expected time:1000
priority:3
Michal Plutynski
Greenhorn

Joined: Mar 01, 2012
Posts: 14

Do not 'eat' the exception. Maybe throw 'Exception e' to the console, then you will find out what is the problem or just post your exception here.
Lio Liov
Ranch Hand

Joined: Mar 21, 2012
Posts: 33
Thanks.My problem was that I didnt trim the string before I parse it
But enableing the exception help me figurate the problem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with parseInt and entering in array