I have a question about auto input data from txt file into array. I have this file txt below and I want to take input 2 array like Doctor and Pet. Doctor: name and specializaion private ArrayList arrDoctor = new ArrayList<>(); Pet: name, type, size, weight, age,doctor. private ArrayList arrPet = new ArrayList<>();
This is my file.txt.
doctors
name joao
specialisation cat
name maria
specialisation dog
pets
name lara
type cat
size small
weight 4.0
age 5
doctor joao
name biro
type dog
size large
weight 15.0
age 12
doctor maria
name benny
type cat
size large
weight 7.0
age 10
doctor none