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.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
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.