NumberFormat.parseObject(String source, ParsePosition pos) has the following syntax.
public final Object parseObject(String source, ParsePosition pos)
In the following code shows how to use NumberFormat.parseObject(String source, ParsePosition pos) method.
import java.text.NumberFormat; import java.text.ParsePosition; public class Main { public static void main(String[] args) throws Exception { NumberFormat numberFormat = NumberFormat.getNumberInstance(); System.out.println(numberFormat.parseObject("123",new ParsePosition(0))); } }
The code above generates the following result.