Try to add some System.out.println in the readFile method and see what happens. Also you need to declare the list as a private member of the class like filePath. With your way, you create it in the method readFile and then after it executes, you have lost it, you cannot access it
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
stultuske commented: agreed. avoiding an indexoutofboundsexception is way better than handling it. +14
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
Ezzaral commented: Helpful explanation. +15
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
peter_budo commented: One for sticking with this guy, and hard time spoon-feeding :) +16
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
kvprajapati commented: +1 Good suggestion. +15
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
jamd200 commented: Thank you for you help. - jamd200 +1
NormR1 commented: Nice details.I was too lazy. +12
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
arshi9464 commented: superb programmer and logic builder. +2
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
kvprajapati commented: words :) +14
peter_budo commented: Thank you for helping out +16
Dean_Grobler commented: Right to the point, easy to understand explination. Well done! +1
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
zach&kody commented: Thanks! +0
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
kvprajapati commented: Thanks Mate! Unique way to report :) +11
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
peter_budo commented: Good reply +15