Question: Please help me with java language. I tried to do it but there is no file output. Run the following JAVA program. Make sure that
Run the following JAVA program. Make sure that a text file named data.txt is created in the project with the content "Hello World". Note: if data.txt does not appear inside the project folder after running the program, refresh the project. import java.io.* public class FileWriting public static void main(String args[]) { try { PrintWriter pw = new PrintWriter("data.txt"); pw.println("Hello World"); pw.close(); } catch (IOException e) { System.out.println("Io error"); > catch (Exception e) { System.out.println("error"); > Modify the program to print your full name in asterisk box to the text file. Sample output: FileWriting java data.it 1 2 * MOHAMMAD BAKRI CHE HARON * * * **
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
