I need to read a line by line from text file using String tokenizer.
attached is the file format of text file.
please give me suggestions and do the needful.
Thanks in advance.
Printable View
I need to read a line by line from text file using String tokenizer.
attached is the file format of text file.
please give me suggestions and do the needful.
Thanks in advance.
The StringTokenizer class does NOT read data from files. You need to use a class that reads from a file.
For student exercises, you could use the Scanner class.
so tell me how to read and write the text file and need to store in the hashmap
You can use the Scanner class to read the file.
And the PrintWriter class to write to a file.
Please explain in more detail what you want to do with a hashmap.
Hello and welcome to the forums Chloe. How about you create a thread in the Introductions category, and tell a little about yourself.