Java Program for File Input/Output, Serialization, and Deserialization
VerifiedAdded on 2020/09/25
|3
|394
|35
Homework Assignment
AI Summary
This Java assignment comprises two parts. The first part focuses on object serialization and deserialization, where a `MyInfo` class is created and its objects are written to a file using `FileOutputStream` and `ObjectOutputStream`. The program then reads the object from the file using `FileInputStream` and `ObjectInputStream`, demonstrating the process of deserialization. The second part involves file input/output and string manipulation. It reads a file, counts the occurrences of the strings “CSE1007” and “JAVA”, and prints the counts to the console. The program uses `FileInputStream` to read the file and splits the content based on the target strings to count their occurrences. This assignment provides practical examples of file handling and object serialization in Java.
1 out of 3









