Java ObjectInputStream readBoolean() MethodThe readBoolean() method of the java.io.ObjectInputStream class is used to read the data of Boolean type. It returns true if the byte is non zero, false if the byte is zero. SyntaxParameterNo parameter is passed. Returnstrue/false. ThrowsEOFException - If the end of file is reached. IOException - If other I/O error has occurred. Example 1Output: Hello javaTpoint byte is non Zero Example 2Output: Hello javaTpoint byte is Zero
Next TopicJava ObjectInputStream
|