Explore topic-wise MCQs in Object Oriented Programming.

This section includes 20 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.

1.

Which package contains the utility classes?

A. java.lang
B. java.utility
C. java.util
D. java.io
Answer» D. java.io
2.

Which is not a System class variable?

A. err
B. out
C. in
D. put
Answer» E.
3.

What does load(String)::= function do, in System class?

A. Loads dynamic library for a path name
B. Loads all the dynamic libraries
C. Loads all the Number in string format
D. Loads the processor with calculations
Answer» B. Loads all the dynamic libraries
4.

Which class contain runFinalization() method?

A. Finalize
B. System
C. Final
D. SystemFinal
Answer» C. Final
5.

Which function should be used to exit from the program that is provided by System class?

A. exit(int);
B. gc();
C. terminate();
D. halt();
Answer» B. gc();
6.

Number class can’t manipulate ____________________

A. Integer values
B. Float values
C. Byte values
D. Character values
Answer» E.
7.

Which attribute can be used to get the size of an array?

A. Size.Array
B. Array.Size
C. Array_name.length
D. length.Array_name
Answer» D. length.Array_name
8.

DataInputStream is derived from ______________________

A. StreamingInput
B. StreamedInput
C. StreameInput
D. StreamInput
Answer» E.
9.

What is the use of Math class?

A. To use the mathematical functions with strings
B. To use the mathematical functions
C. To suppress the use of mathematical functions
D. To complex the calculations
Answer» C. To suppress the use of mathematical functions
10.

Which statement is true for the Array class?

A. Arrays can have variable length
B. The length array can be changed
C. Each class has an associated Array class
D. Arrays can contain different type of values
Answer» D. Arrays can contain different type of values
11.

What is the InputStream class meant for?

A. To handle all input streams
B. To handle all output streams
C. To handle all input and output streams
D. To handle only input from file
Answer» B. To handle all output streams
12.

Which among the following not an inbuilt class in C++?

A. System
B. Color
C. String
D. Functions
Answer» E.
13.

What doesn’t inbuilt classes contain?

A. Function prototype
B. Function declaration
C. Function definitions
D. Objects
Answer» D. Objects
14.

Inbuilt class __________________________

A. Must be included before use
B. Are not necessary to be included for use
C. Are used by the compiler only
D. Can be modified by programmer always
Answer» B. Are not necessary to be included for use
15.

What are inbuilt classes?

A. The predefined classes in a language
B. The classes that are defined by the user
C. The classes which are meant to be modified by the user
D. The classes which can’t be used by the user
Answer» B. The classes that are defined by the user
16.

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

A. UnsupportedException
B. UnsupportedEncodingException
C. SupportException
D. EncodingException
Answer» C. SupportException
17.

NUMBER_CLASS_CAN‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ¬•T_MANIPULATE_____________________?$#

A. Integer values
B. Float values
C. Byte values
D. Character values
Answer» E.
18.

Which class contain runFinalization() method?$

A. Finalize
B. System
C. Final
D. SystemFinal
Answer» C. Final
19.

Which function should be used to exit from the program that is provided by System class?$

A. exit(int);
B. gc();
C. terminate();
D. halt();
Answer» B. gc();
20.

What doesn’t inbuilt classes contain?$

A. Function prototype
B. Function declaration
C. Function definitions
D. Objects
Answer» D. Objects