[Question 1] Create NewFile() method to create a text file in your name. Use try and catch for file exception handling.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
[Question 1] Create NewFile() method to create a text file in your name. Use try and catch for file exception handling.
[Question 1] Create NewFile() method to create a text file in your name. Use try and catch for file exception handling. Operations carried out on the file to print on the console: ● Get file information like - The name of the file - The absolute path of the file - The size of the file - Check Is the file readable - Check Is the file writeable Write into the file -Use the FileWriter class of the byte stream to write into a file. Content to write into the text file (your First name, Course, University) Read using File Reader and print the file content on the console.