I was wondering how I can go about reading a text file into an array, the text file would contain something along the lines of:
string:string:string
string:string:string
string:string:string
etc
(string:string:string being on a single line)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
UPDATE:
I think you might want to read a file into an array but you don’t know set the size of an array. You can use a
java.util.ArrayListfor that and then convert it to an array.You can use the
java.util.Scannerclass and then use theuseDelimiterfunction.Example here