I'm just a beginner in java programming and I would like to ask how to manage the reading from file to class.
I mean, I have a file containing this kind of information:
the 1st string before the % is a name of the player (in a soccer team) the 2nd is his role, the 3rd is his team and the last is the credits of his quotation.
Well, what I want to do is to read these infos from file and save them in a class by using some arrays.
For example I will create:
and I want that :
String name = Abbiati
String role = goalkeeper
String team  = MILAN
String credits = 2
And so on for each rows of my file which contains all the players of MILAN team.
I simply don't know how realize this thing in java...
Can someone suggest me the java code?
Thanks in advance for your cooperation!!