On Sun, 28 Nov 2010 19:13:40 -0800 (PST), Ram <>
wrote, quoted or indirectly quoted someone who said :
>I have a string "1,2"
>i want to parse it and get these two values in a seperate variable.
>
>my main intention is to read these two values from a file, where these
>values are programmable and changes by user menu.
>
>I am new to java programming, please give suggest some coding
>examples.
Split it first with regex split. trim, then convert String -> int.
see
http://mindprod.com/jgloss/regex.html#SPLITTING
String.trim()
http://mindprod.com/applet/converter.html
--
Roedy Green Canadian Mind Products
http://mindprod.com
In programming, and documenting programs, keep vocabulary consistent and precisely defined! Variation in vocabulary to relieve the tedium is for novels.