File Handling in Java
Why File Handling is needed ?
- So far the operations using Java programs are done on a prompt/terminal which is not stored anywhere.
- But in the software industry, most of the programs are written to store the information fetched from the program.
- One such way is to store the fetched information in a file.
What is File Handling in Java ?
- A file is a container which is used to store various types of information.
- Data is permanently stored in secondary memory by creating a file with a unique name.
- A file may consist of text, image or any other document.
- Creation of a new file
- Opening an existing file
- Reading from file
- Writing to a file
- Moving to a specific location in a file
- Closing a file