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

Why is string builder not thread safe?

0 Answers  


Write program to print Hello World and print each character address in that string and print how many times each character is in that string? Ex: H: 0 & 1 e:1 & 1 l :2,3,8 & 3 o:4,6 & 2 w:5 & 1 r: 7 & 1 d 9 & 1

7 Answers   Huawei, IBM,


which class to use when concatenating strings in a loop.

3 Answers   IBM,


Can inner class be public in java?

0 Answers  


How do I stop concurrentmodificationexception?

0 Answers  






1).Is Object class abstract or not? 2).Is main method(public static void main(String args[])low priority thread or high priority thread?

3 Answers   TCS,


Does garbage collection occur in permanent generation space in jvm?

0 Answers  


Hi Friends, can you explain instance in java. In general instance means "occurence of something" . In java what is instance.

4 Answers  


What is singleton class in ruby?

0 Answers  


how to run ecllipse with jettyserver for windows environment using batch file

0 Answers  


when to use abstract class and when to use interface?

16 Answers   Exterro, iGate, IonIdea,


Is void a type?

0 Answers  


Categories