How to write my output to a text file :( ?
Hi everyone,
I have this code given, and I would like to put my output of this code into a text file. Can anyone help me do that?? :( thanks in advance.
The code is this:
import java.net.*;
import java.io.*;
public class URLReader {
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://www.oracle.com/");
BufferedReader in = new BufferedReader(
new InputStreamReader(oracle.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
Re: How to write my output to a text file :( ?