Java Deserialization: Which Input Stream is Used?
The correct answer is 'C ObjectInputStream'.
In Java, deserialization is the process of converting a serialized representation of an object (typically stored in a file or transmitted over a network) back into an object in memory. This is achieved using the ObjectInputStream class.
Here's a breakdown of why the other options are incorrect:
- FileWriter: Used for writing text data to files, not for deserialization.
- FileReader: Used for reading text data from files, not for deserialization.
- ObjectOutputStream: Used for serializing objects into a byte stream, not for deserialization.
原文地址: https://www.cveoy.top/t/topic/oz1H 著作权归作者所有。请勿转载和采集!