Reading files and putting them into an array ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Reading files and putting them into an array ?

Not sure how to do this... i googled around a bit and found answers.. though i didn’t understand :( any help would be greatly appreciated ♥️

15th Mar 2018, 5:21 PM
Sabo Captain
Sabo Captain - avatar
1 Answer
+ 6
public void readCodesFile() { while(readCodes.hasNext()) { codes[i] = readCodes.next(); System.out.println(codes[i]); i++; } } for more: 1- https://stackoverflow.com/questions/19844649/java-read-file-and-store-text-in-an-array 2-http://www.dreamincode.net/forums/topic/166104-reading-text-file-storing-it-into-an-array/
15th Mar 2018, 5:50 PM
Baraa AB
Baraa AB - avatar