IntWritable value = new IntWritable(Integer.parseInt(someString))
... and deal with the possibility of what parseIntmight throw away NumberFormatException.
Someone asked:
How to overcome this NumberFormatException
You will catch him and, of course, handle it! Java exceptions and exception handling are described in the Oracle Java tutorials here .
source
share