Here you can find the source of parseNumeric(String value)
public static Number parseNumeric(String value)
//package com.java2s; //License from project: Apache License import java.text.NumberFormat; import java.text.ParseException; public class Main { public static Number parseNumeric(String value) { try {/*from w ww .ja va 2 s . c o m*/ return Long.parseLong(value); } catch (NumberFormatException nfe) { try { return Double.parseDouble(value); } catch (NumberFormatException nfe2) { try { return NumberFormat.getInstance().parse(value); } catch (ParseException e) { return null; } } } } }