My class:
public class Test{
public static void writeSmth() {
try {
BufferedWriter out = new BufferedWriter(
new FileWriter("one.txt"));
out.write("content");
} catch (IOException e) {
e.printStackTrace();
}
}
}
Location of txt file:
/ProjectName/one.txt
when i try to write data nothing happens with this file. I tried:
BufferedWriter out = new BufferedWriter(
new FileWriter("/ProjectName/one.txt"));
Got java.io.FileNotFoundException
tried:
BufferedWriter out = new BufferedWriter(
new FileWriter("./one.txt"));
Still nothing happens.
What is the problem?