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

Explain all java features with real time examples

1307


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

1446


Explain different states of a thread in java?

689


How many types of gc are there in java?

655


What is class array in java?

610






What is runtime locatable code?

980


can I implement my own start() method? : Java thread

651


What about instanceof operator in java?

680


Is vector ordered in java?

631


How would you dynamically allocate memory to an array?

677


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

1588


When object is created and destroyed?

732


What are the types of exceptions?

676


How do you sort a set in java?

614


What function extracts specified characters from a string?

650