Govt. Exams
Entrance Exams
If no charset is explicitly provided, InputStreamReader uses the platform's default charset, which varies by system configuration.
SAX parsers and streaming XML parsers process XML sequentially without loading the entire document, making them ideal for large files.
For real-time applications requiring minimal latency, smaller buffer sizes and frequent flushing ensure data is processed immediately rather than waiting for buffer to fill.
InvalidClassException is thrown when a serialized object's serialVersionUID doesn't match the current class definition, indicating an incompatible class version.
Reading each line requires processing each character once, resulting in O(n) complexity where n is total characters.
SequenceInputStream concatenates multiple input streams, allowing them to be read as one continuous stream.
PrintWriter suppresses IOException and continues silently, unlike other streams.
serialVersionUID identifies class versions. Mismatched versions cause InvalidClassException during deserialization.
BufferedReader buffers input, reducing system calls and I/O overhead, improving performance significantly.
Externalizable requires implementation of writeExternal() and readExternal() for complete control over serialization.