Skip to content

Instantly share code, notes, and snippets.

@sh1n0b1
Last active December 16, 2015 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sh1n0b1/5428373 to your computer and use it in GitHub Desktop.
Save sh1n0b1/5428373 to your computer and use it in GitHub Desktop.
Java ReadFile
import java.io.*;
import java.util.*;
public static void main(String[] args){
readFile(args[0]);
}
public static void readFile(String fileName) throws FileNotFoundException{
File file = new File(fileName);
Scanner scan = new Scanner(file);
String code = "";
while(scan.hasNext()){
code += scan.nextLine();
}
String[] a;
a = code.split(" ");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment