Java-Programming Solved MCQs (Set-4)
Java-Programming Solved MCQs (Set-4)
A. IOException
B. InterruptedException
C. SystemException
D. SystemInputException
o m
.c
Answer: A
te
a
M
77. Which is the super class of all exception classes
q
A. Exception c
B. Object
M
C. Error
D. Throwable
Answer: D
78. Which class is the super class of all classes of the java.lang package?
A. Object
B. System
C. Super
D. Class
Answer: A
A. NumberFormatException
C. NullPointerException
D. IllegalArgumentException
Answer: B
A. finally
B. catch
o m
C. catch or finally
.c
te
D. None of the mentioned
a
Answer: C
q M
c
M
81. Which of these exceptions will occur if we try to access the index of an
array beyond its length?
A. ArithmeticException
B. ArrayException
C. ArrayIndexException
D. ArrayIndexOutOfBoundsException
Answer: D
82. Runnable is a
A. Class
B. Method
C. Variable
D. Interface
Answer: D
B. Float
C. double
D. long
Answer: A
A. String
o m
B. System
.c
te
C. Thread
a
D. Runnable
q M
Answer: C
c
M
85. Which of these interface is implemented to create a Thread?
A. Runnable
B. Connections
C. Set
D. MapConnections
Answer: A
86. Which of these method of Thread class is used to find out the priority
given to a thread?
A. get()
B. ThreadPriority()
C. getPriority()
D. getThreadPriority()
Answer: C
A. sleep()
B. terminate()
C. stop()
D. block()
Answer: A
o m
.c
88. Which method in Thread class is used to check weather a thread is still
running?
te
a
A. isAlive()
q M
B. Join() c
C. isRunning() M
D. Alive()
Answer: A
A. run()
B. start()
C. runThread()
D. startThread()
Answer: B
A. sleep()
B. isAlive()
C. join()
Answer: C
91. Which of these is used to read a string from the input stream?
A. get()
B. getLine()
C. read()
D. readLine()
o m
Answer: D
.c
te
92. Which of these classes is used toaread characters and strings in Java
from console?
q M
c
A. BufferedReader
B. StringReader
M
C. BufferedStreamReader
D. InputStreamReader
Answer: D
93. Which of these classes are used by Byte streams for input operation?
A. InputStream
B. InputOutputStream
C. Reader
Answer: A
94. Which of these class contains the methods print() & println()?
A. System
B. System.out
D. PrintStream
Answer: D
A. printout()
B. println()
C. write()
o m
D. All of the mentioned
.c
te
Answer: B
a
q M
96. Which of these classes are used by character streams output
operations? c
A. OutputStream
M
B. Writer
C. ReadStream
D. InputOutputStream
Answer: B
97. Which refers to a channel through which data flow from the source to
the destination:
A. String
B. Character
C. Stream
D. Buffer
Answer: C
Answer: A
A. 8 bit
o m
B. 16 bit
.c
te
C. 32 bit
a
D. 64 bit
q M
Answer: A
c
M
100. Character Stream Classes support input/output operations on
_______ characters:
A. 8 bit Unicode
B. 16 bit Unicode
C. 32 bit Unicode
D. 64 bit Unicode
Answer: B
For Discussion / Reporting / Correction of any MCQ please visit discussion page by clicking on
'answer' of respective MCQ.
PlayStore
o m
.c
te
a
q M
c
M