Read a Tab Delimited File

From Progzoo
Jump to: navigation, search
A "Tab Delimited File" records one record per line. The fields of each record are separated by the tab character.
Albania	Europe	28728	3200000	6656000000
Andorra	Europe	468	64000	0
Argentina	South America	2800000	39300000	146196000000
Benin	Africa	112622	7100000	3763000000
...
  • A BufferedReader is used to read the file line by line.
  • The string method split("\t") turns the string into an array of strings.


[Font] [Default] [Show] [Resize] [History] [Profile]