Skip to content

Instantly share code, notes, and snippets.

@pete911
Created August 15, 2012 09:05
Show Gist options
  • Save pete911/3357848 to your computer and use it in GitHub Desktop.
Save pete911/3357848 to your computer and use it in GitHub Desktop.
convert file to array
String fileContent = new Scanner(file).useDelimiter("\\A").next();
String[] fileLines = fileContent.split(System.lineSeparator());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment