I have a program that is getting input from a text file. One of the values is in the format of:
+ or - , a number
ex.
-1, +4.5, -2.75
these are coming in as strings. when i try to change them to an int, i get an exception.
java.lang.NumberFormatException: +1
I need an int to change the hour on a clock:
cal.add(Calendar.HOUR, getOffset());
getOffset() returns an int that has been changed from a
string in setOffset().
Any ideas? Thanks!