what value will be return by the read() method once it
reaches the end-of-file?
a. Throws EOException
b. Return null
c. Return -1
d. Read method return nothing, because it is void method

Answer Posted / ash

Generally the read method reads integer and returns integer...so i think it will return -1.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the three types of design patterns?

503


What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?

600


How many techniques can be employed to create a string object?

551


explain the difference between jdk and jvm?

555


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread

589






What is the use of private static?

527


What is variable declaration and definition?

536


What is queue in java?

552


What is mvc in java?

551


Can java run on google chrome?

563


What is thread pool in java with example?

536


What is a local, member and a class variable?

571


What is currentthread()?

568


Is empty list java?

514


Is c better than java?

537