Write a program that has two threads
First thread queries the database and fetches all the employee records from the emp table. Stores the employee objects in a collection. then, it serializes each employee object and stores to a local file. Upon serializing all the employee objects, it prints confirmation to the screen that serialization is complete.
The control will invoke the Second thread which is passed the path of the serialized file It willl then, deserializes the file contents into respective Employee records And then stores all the employee objects into another collection.
The main thread will then iterate through both the collections and prints the employee object details from both showing that object contents are the same.
Note: Create Employee.java with the properties same as the emp table columns. Create another class having different methods to contain the above requirement.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.