JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Object Oriented Programming interview questions part 22
Object Oriented Programming interview questions part 22
Back
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.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
2. How can you make the private members inheritable?
A. By making their visibility mode as public only
B. By making their visibility mode as protected only
C. By making their visibility mode as private in derived class
D. It can be done both by making the visibility mode public or protected
Show Correct Answer
Correct Answer is :
It can be done both by making the visibility mode public or protected
3. What is the use of IO class?
A. To handle all the input operations
B. To handle all the output operations
C. To handle all the input and output operations
D. To handle all the input and output to the standard input
Show Correct Answer
Correct Answer is :
To handle all the input and output operations
4. IO class provides input and output through ______________________
A. Data streams
B. Serialization
C. File system
D. Data streams, serialization and file system
Show Correct Answer
Correct Answer is :
Data streams, serialization and file system
5. Which among the following class contains the methods to access character based console device?
A. Console
B. File
C. Device
D. Pipe
Show Correct Answer
Correct Answer is :
Console
6. File class is ____________________________
A. An abstract of file representation only
B. An abstract of path names only
C. An abstract which can be used to represent path names or file
D. An abstract which can represent a file in any format
Show Correct Answer
Correct Answer is :
An abstract which can be used to represent path names or file
7. What is a FileDescriptor?
A. A handle for machine specific structure of an open file
B. A handle for program specific structure of an open file
C. A handle for compiler specific structure of an open file
D. A handle for representing device files structure
Show Correct Answer
Correct Answer is :
A handle for machine specific structure of an open file
8. FileInputStream _________________________
A. Gets the input stream from any device file
B. Gets the input stream from any open socket
C. Gets the input stream from any cache
D. Gets the input stream from any open file only
Show Correct Answer
Correct Answer is :
Gets the input stream from any open file only
9. What does FilePermission class do?
A. This class is used to give permission rights to a file
B. This class is used to restrict use of permissions
C. This class is used to represent device access permissions
D. This class is used to represent file access permissions
Show Correct Answer
Correct Answer is :
This class is used to represent file access permissions
10. Which class among the following makes incorrect assumptions?
A. LineNumberInputStream
B. LineNumberReader
C. LineReader
D. LineBuffer
Show Correct Answer
Correct Answer is :
LineNumberInputStream
11. Reader class is _________________
A. Used to read from files
B. Abstract class to read character streams
C. Abstract class to input character streams
D. Used to take input from standard input stream
Show Correct Answer
Correct Answer is :
Abstract class to read character streams
12. Which class can handle IO class interrupt?
A. ExceptionIO
B. InteruptedIO
C. InteruptedIOException
D. IOInteruptException
Show Correct Answer
Correct Answer is :
InteruptedIOException
13. StringReader handles _____________________
A. Any character stream
B. A character stream whose source is an array
C. A character stream whose source is character array
D. A character stream whose source is String only
Show Correct Answer
Correct Answer is :
A character stream whose source is String only
14. Which exception handler can be used when character encoding is not supported?
A. UnsupportedException
B. UnsupportedEncodingException
C. SupportException
D. EncodingException
Show Correct Answer
Correct Answer is :
UnsupportedEncodingException
15. PushBackReader allows the streams to be pushed back to the stream.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
16. RandomAccessFile can be used to _______________________
A. Read from a random access file
B. Write to a random access file
C. Read and write to a random access file
D. Restricts read and write to a random access file
Show Correct Answer
Correct Answer is :
Read and write to a random access file
17. Which among the following is a serialization descriptor for any class?
A. StreamClass
B. ObjectStreamClass
C. ObjectStream
D. StreamObjectClass
Show Correct Answer
Correct Answer is :
ObjectStreamClass
18. What are local classes?
A. Classes declared inside a package
B. Classes declared inside a function
C. Classes declared inside a class
D. Classes declared inside structure
Show Correct Answer
Correct Answer is :
Classes declared inside a function
19. All member functions of a local class must be ___________
A. Defined outside class body
B. Defined outside the function definition
C. Defined inside the class body
D. Defined at starting of program
Show Correct Answer
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?
A. Yes, it can access with arrow operator
B. No, it can’t access with dot operator
C. Yes, it can access using dot operator
D. No, it can’t access In anyway
Show Correct Answer
Correct Answer is :
No, it can’t access In anyway
Similar Interview Questions
Search for latest jobs
Find Jobs