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



what value will be return by the read() method once it reaches the end-of-file? a. Throws EOExcep..

Answer / 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

More Core Java Interview Questions

what is difference between excute query ()and execute update ()?

6 Answers   Symphony,


What is the difference between the file and randomaccessfile classes?

0 Answers  


How GUI component handle its own events?

1 Answers  


Can you call a method in a method?

0 Answers  


What is meant by final class?

0 Answers  






Which variables are stored in stack?

0 Answers  


What is data string?

0 Answers  


Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?

7 Answers   Ericsson,


What is the difference between an argument and a parameter?

0 Answers  


When will you define a method as static?

0 Answers  


How to avoid the runtime exception ?

2 Answers  


What do you understand by private, protected and public?

0 Answers  


Categories