Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
Java
10.1k+ articles
Java-Functions
4.1k+ articles
Java Programs
2.1k+ articles
Java-IO package
240+ articles
Java Examples
230+ articles
Java-HashMap
140+ articles
Java-String-Programs
130+ articles
Java-Array-Programs
100+ articles
java.nio.file package
43 articles
java-file-handling
34 articles
Java-Files
66 posts
Popular Articles
Recent Articles
Read File Into an Array in Java
Last Updated: 21 February 2022
In Java, we can store the content of the file into an array either by reading the file using a scanner or bufferedReader or FileReader or by
...read more
Java
Java-Arrays
Picked
Java-Files
File Handling in Java
Last Updated: 10 January 2025
In Java, with the help of File Class, we can work with files. This File Class is inside the java.io package. The File class can be used to c
...read more
Java
java-file-handling
Picked
Java-Files
Java FileReader Class
Last Updated: 02 January 2025
FileReader in Java is a class in the java.io package which can be used to read a stream of characters from the files. Java IO FileReader cla
...read more
Java
Picked
Java-Classes
Java-IO package
Java-Files
Similar Topics
Java
10.1k+ articles
Java-Functions
4.1k+ articles
Java Programs
2.1k+ articles
Java-IO package
240+ articles
Java Examples
230+ articles
Java-HashMap
140+ articles
Java-String-Programs
130+ articles
Java-Array-Programs
100+ articles
java.nio.file package
43+ articles
java-file-handling
34+ articles
Java Program to Save a String to a File
Last Updated: 03 March 2023
A demo file on the desktop named 'gfg.txt' is used for reference as a local directory on the machine. Creating an empty file before writing
...read more
Java
Java Programs
Picked
Java-Files
Java Program to Read a File to String
Last Updated: 10 October 2022
There are multiple ways of writing and reading a text file. This is required while dealing with many applications. There are several ways to
...read more
Java
Java Programs
Picked
Java-Files
Java Program to Convert File to a Byte Array
Last Updated: 22 April 2022
Here, we will go through the different ways to convert file to byte array in Java.Note: Keep a check that prior doing anything first. Create
...read more
Java
Java Programs
Picked
Java-Array-Programs
Java-Files
Different Ways to Copy Files in Java
Last Updated: 04 March 2022
There are mainly 3 ways to copy files using java language. They are as given below:Using File Stream (Naive method)Using FileChannel ClassUs
...read more
Java
Picked
Java-Files
Files copy() Method in Java with Examples
Last Updated: 20 July 2022
The copy() method of java.nio.file.Files Class is used to copy bytes from a file to I/O streams or from I/O streams to a file. I/O Stream me
...read more
Java
Java-Files
Java Program to Read Content From One File and Write it into Another File
Last Updated: 16 June 2022
File handling plays a major role in doing so as the first essential step is writing content to a file. For this is one must know how to writ
...read more
Java
Java Programs
Picked
Java-Files
Java Program to Write into a File
Last Updated: 10 January 2025
FileWriter class in Java is used to write character-oriented data to a file as this class is character-oriented because it is used in file h
...read more
Java
Java Programs
Picked
Java-Files
Reading Text File into Java HashMap
Last Updated: 28 December 2020
We will look into the Method that allows us to read the HashMap Text from the file or how we can De-serialised the FileDe-Serialization: Her
...read more
Java
Technical Scripter
Java Programs
Java-HashMap
Picked
Java-Files
Technical Scripter 2020
Java FileWriter Class
Last Updated: 10 January 2025
Java FileWriter class of the java.io package is used to write data in character form to a file. The FileWriter class in Java is used to writ
...read more
Java
Java-IO package
Java-Files
Java Program to Rename a File
Last Updated: 09 November 2020
Changing the name of the file is known as Renaming the file. Rename operation is possible using renameTo() method belongs to the File class
...read more
Java
Technical Scripter
Java Programs
Java-Files
Technical Scripter 2020
Java Program to Create a New File
Last Updated: 10 January 2025
There are two standard methods to create a new file, either directly with the help of the File class or indirectly with the help of the File
...read more
Java
Java Programs
java-file-handling
Java-Files
Different Ways to Copy Content From One File to Another File in Java
Last Updated: 26 October 2020
In Java, we can copy the contents of one file to another file. This can be done by the FileInputStream and FileOutputStream classes.FileInpu
...read more
Java
Java Programs
Java-Files
1
2
3
4
5
>>
Last
1
2
3
4
5
>>
Last
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !