Junior — Middle
Is anything written to a text file when creating an InputStream object?
sobes.tech AI
Answer from AI
Creating an InputStream object in Java does not write anything to a text file. InputStream is intended for reading data from a source (file, network, memory, etc.), not for writing. Writing to a file is done through classes that inherit from OutputStream or Writer. For example, FileInputStream opens a file for reading but does not modify its contents.