Hello, I am using JDK 1.1.8 (I can not update to new version because of another software dependancy). When I tried to use the line below: updateTable.setFloat (1, Float.parseFloat(fieldList.nextToken())); I am getting "Method parseFloat(java.lang.String) not found in class java.lang.Float" Should I import another package? Or 1.1.8 does not have this method? Thanks Suresh
posted 13 years ago
You should always check the API for the JDK you're using. In this case, try Float.valueOf(input).floatValue() Obviously this was a rather backwards way of getting what you want, so they added parseFloat() in later versions of the JDK.