| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. The private members of the base class are visible in derived class but are not accessible directly.

Correct Answer is : TRUE

2. How can you make the private members inheritable?

Correct Answer is : It can be done both by making the visibility mode public or protected

3. What is the use of IO class?

Correct Answer is : To handle all the input and output operations

4. IO class provides input and output through ______________________

Correct Answer is : Data streams, serialization and file system

5. Which among the following class contains the methods to access character based console device?

Correct Answer is : Console

6. File class is ____________________________

Correct Answer is : An abstract which can be used to represent path names or file

7. What is a FileDescriptor?

Correct Answer is : A handle for machine specific structure of an open file

8. FileInputStream _________________________

Correct Answer is : Gets the input stream from any open file only

9. What does FilePermission class do?

Correct Answer is : This class is used to represent file access permissions

10. Which class among the following makes incorrect assumptions?

Correct Answer is : LineNumberInputStream

11. Reader class is _________________

Correct Answer is : Abstract class to read character streams

12. Which class can handle IO class interrupt?

Correct Answer is : InteruptedIOException

13. StringReader handles _____________________

Correct Answer is : A character stream whose source is String only

14. Which exception handler can be used when character encoding is not supported?

Correct Answer is : UnsupportedEncodingException

15. PushBackReader allows the streams to be pushed back to the stream.

Correct Answer is : TRUE

16. RandomAccessFile can be used to _______________________

Correct Answer is : Read and write to a random access file

17. Which among the following is a serialization descriptor for any class?

Correct Answer is : ObjectStreamClass

18. What are local classes?

Correct Answer is : Classes declared inside a function

19. All member functions of a local class must be ___________

Correct Answer is : Defined inside the class body

20. Can local class members access/use the general local variables (except static, abstract etc.) of the function in which it is defined?

Correct Answer is : No, it can’t access In anyway