Top "Numberformatexception" questions

A NumberFormatException occurs in Java code when a programmer tries to convert a String into a number and the conversion fails.

Why do Double.parseDouble(null) and Integer.parseInt(null) throw different exceptions?

Why do Double.parseDouble(null) and Integer.parseInt(null) throw different exceptions? Is this a historical accident or intentional? The …

java exception nullpointerexception numberformatexception
Convert timestamp string to long in java

I have to fetch time stamp from DB and retrieve only time and compare two time. //below are the string …

java string numberformatexception
Getting a NumberFormatException

I was writing some code for an interviewstreet.com challenge My code gives a NumberFormatException import java.io.*; public class …

java numberformatexception
Cannot convert String to Integer in Java

I have written a function to convert string to integer if ( data != null ) { int theValue = Integer.parseInt( data.trim(), 16 ); return …

java numberformatexception
Read integer from numeric cell using Apache POI in java

I have an application which reads xls sheet using apache poi. When the cell has numeric value, i read it …

java apache-poi xls numberformatexception
java.lang.NumberFormatException: For input string: "23 "

I gave 23 (looks like a proper string) as input, but stil get NumberFormatException. Please point out where I went wrong. …

java string numberformatexception parseint
whats wrong?(NumberFormatException: null)

import java.io.*; class AccountInfo { private String lastName; private String firstName; private int age; private float accountBalance; protected AccountInfo(final …

java numberformatexception
java.lang.NumberFormatException: Invalid int: "" in android

I already know what is causing this error, I just do not know how to handle the case when a …

android numberformatexception
java.lang.NumberFormatException: For input string: "1,167.40"

I'm reading data from CSV file. One of the fields contains the value 1,167.40. The code piece for reading this field …

java double number-formatting numberformatexception
NumberFormatException: Infinite or NaN

I have a method that takes n and returns nth Fibonacci number. Inside the method implementation I use BigDecimal to …

java fibonacci numberformatexception