This is my code for writing to a file using print stream in java
PrintStream stream = null;
try {
stream = new PrintStream(new File("hi.txt"));
stream.println("hi my name is chris");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally{
stream.close();
}
My question is after I execute this piece of code, where can I find hi.txt in eclipse? Usually when I am working with text files, the text file appears under JRE system Library. In this case, it doesn't