Java Programming Solved MCQs (Set-4)
Java Programming Solved MCQs (Set-4)
SystemInputException An
77. Which is the super class of all exception classesA. ExceptionB. ObjectC. ErrorD. Throwable Answer: D
78. Which class is the super class of all classes of the java.lang package?A. ObjectB. SystemC. SuperD. Class Answer: A
79. Which of the following exception is raised when a number is divided by zeroA. NumberFormatExceptionB. ArithmeticExceptionC. Nu
83. Thread priority in Java is represented as?A. intB. FloatC. doubleD. long Answer: A
84. Which of these class is used to make a thread?A. StringB. SystemC. ThreadD. Runnable Answer: C
85. Which of these interface is implemented to create a Thread?A. RunnableB. ConnectionsC. SetD. 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. ge
87. Which of this method of Thread class is used to change the state of a thread to blocked state?A. sleep()B. terminate()C. stop()D. block(
88. Which method in Thread class is used to check weather a thread is still running?A. isAlive()B. Join()C. isRunning()D. Alive() Answer:
89. Which of these methods is used to begin the execution of a thread?A. run()B. start()C. runThread()D. startThread() Answer: B
90. Which of these method waits for the thread to treminate?A. sleep()B. isAlive()C. join()D. stop() Answer: C
91. Which of these is used to read a string from the input stream?A. get()B. getLine()C. read()D. readLine() Answer: D
92. Which of these classes is used to read characters and strings in Java from console?A. BufferedReaderB. StringReaderC. BufferedStream
93. Which of these classes are used by Byte streams for input operation?A. InputStreamB. InputOutputStreamC. ReaderD. All of the menti
94. Which of these class contains the methods print() & println()?A. SystemB. System.outC. BufferedOutputStreamD. PrintStream Answe
95. Which of these methods can be used to write console output?A. printout()B. println()C. write()D. All of the mentioned Answer: B
96. Which of these classes are used by character streams output operations?
A. OutputStreamB. WriterC. ReadStreamD. InputOutputStream Answer: B
97. Which refers to a channel through which data flow from the source to the destination:A. StringB. CharacterC. StreamD. Buffer Answer
98. Java Stream classes can be categorized into two groups:A. Byte and Character Stream ClassesB. Stream and String ClassesC. String an
99. Byte Stream Classes support input/output operations on A. 8 bitB. 16 bitC. 32 bitD. 64 bit Answer: A
100. Character Stream Classes support input/output operations on characters:A. 8 bit UnicodeB. 16 bit UnicodeC. 32 bit Unicode