0% found this document useful (0 votes)
2 views1 page

Java IO and File Handling Practice Set

The document contains a list of Java programming tasks that involve reading and writing data using various input and output streams. Tasks include displaying student information, formatting addresses, converting text file content to uppercase, copying file contents, storing and retrieving binary data, redirecting output to a file, and generating a formatted student result report. Each task specifies the required classes and methods to be used for implementation.

Uploaded by

Nitin Varyani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Java IO and File Handling Practice Set

The document contains a list of Java programming tasks that involve reading and writing data using various input and output streams. Tasks include displaying student information, formatting addresses, converting text file content to uppercase, copying file contents, storing and retrieving binary data, redirecting output to a file, and generating a formatted student result report. Each task specifies the required classes and methods to be used for implementation.

Uploaded by

Nitin Varyani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

​ Write a Java program to read a student’s name, roll number, and marks from the
keyboard and display them in a formatted manner on the console using BufferedReader
and InputStreamReader.​

2.​ Write a Java program to display a neatly formatted multi-line address on the console
using character stream output with OutputStreamWriter and BufferedWriter.​

3.​ Write a Java program to read the contents of a text file and write the same content into
another file after converting all characters to uppercase using FileReader and
FileWriter.​

4.​ Write a Java program to copy the contents of one file to another file such that both text
and binary files are copied correctly using FileInputStream and FileOutputStream.​

5.​ Write a Java program to store student roll number and marks in a binary file and then
read and display the stored data using DataOutputStream and DataInputStream.​

6.​ Write a Java program to redirect the standard output to a file, write program output into
that file, and then restore output back to the console using PrintStream.​

7.​ Write a Java program to generate a formatted student result report file containing
headings, aligned columns, total marks, and grade using PrintWriter.​

You might also like