I am currently doing a programming assignment and it says that we should "store all the data in a data file and need to check the compatibility of the user PIN and account no. validity"
Unfortunately my lecturer has not taught us about data files, and when I googled I found two different answers,
- Store data in notepad (.txt) file
- Store data in csv file
MY QUESTION IS WHICH ONE IS A DATA FILE? and how do you retrieve the user PIN (after its typed from buffer reader) to check whether both are correct? Any Help is GREATLY APPRECIATED!!
from wikipedia:
So both a
*.txt
file and a*.csv
file are data files.A
*.csv
(comma-seperated values) file is in essence a*.txt
file that separates your values by a,
The 2 methods you found should do about the same, but it will be easier to use the csv-method.