code: public static void print(String string, File file) throws IOException {
  		PrintWriter out = null;
  		try {
  			out = new PrintWriter(new BufferedWriter(new FileWriter(file)));
  			out.print(string);
  			out.flush();
  			out.close();
  		} finally {
  			if (out != null) out.close();
  		}
  	}
docs: Prints {@code string} to {@code file}.
  @throws IOException If any I/O exception occurs while printing; this method does not catch any exceptions