Skip to content

Instantly share code, notes, and snippets.

@khan5v
Created March 12, 2018 08:05
Show Gist options
  • Save khan5v/e4c9e9139295d959693a3b619f4d2219 to your computer and use it in GitHub Desktop.
Save khan5v/e4c9e9139295d959693a3b619f4d2219 to your computer and use it in GitHub Desktop.
Basic file I/O
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new FileReader("PATH1"));
int T = Integer.parseInt(br.readLine());
PrintWriter writer = new PrintWriter("PATH2", "UTF-8");
writer.println("Line");
writer.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment