I am wondering what is the easiest (and simplest) way to write a text file in Java. Please be simple, because I am a beginner :D
I searched the web and found this co
String content = "your content here"; Path path = Paths.get("/data/output.txt"); if(!Files.exists(path)){ Files.createFile(path); } BufferedWriter writer = Files.newBufferedWriter(path); writer.write(content);