Im having a String array in my constructor which is supposed to read a line in a .txt document by using a bufferedreader. It is containing Strings int´s and two dates. My structure looks like this:
Private String Name;
Private int Number;
Private Date BDate;
String[] splitsarray = line.split("%");
this.Name= splitsarray [0];
this.Number= Integer.parseInt(splitsarray [1]);
I wan’t to do someting like this.BDate= splitsarray [2] but i can’t figuer out how to make it work.
Any hints or tips for me?
Pass the right date pattern in the SimpleDateFormat constructor argument.