Java has no built-in methods for reading data of the form: 123 456,-4.
You have to roll your own method. Use java.io.StreamTokenizer or java.util.StringTokenizer, perhaps in combination with readLine to get your data into strings. StreamTokenizer has bells and whistles to deal with parsing source code, including white space, comments and numbers. StringTokenizer just splits the text up based on delimiter characters. Then use the conversion methods in the conversion table to convert to integers etc.
|
|
available on the web at: |
http://mindprod.com/jgloss/stringtokenizer.html |
optional Replicator mirror
|
J:\mindprod\jgloss\stringtokenizer.html | |
![]() |
Please email your
feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear
wording, broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Blog | Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[54.242.188.217] |
|
| Feedback | You are visitor number 51,298. | |