Top 250+ Solved Java Programming MCQ Questions Answer

From 271 to 285 of 285

Q. What is different between a Java applet and a Java application?

a. An application can in general be trusted whereas an applet can't.

b. An applet must be executed in a browser environment.

c. An applet is not able to access the files of the computer it runs on

d. (A), (B) and (C).

  • d. (A), (B) and (C).

Q. What is multithreaded programming?

a. It’s a process in which two different processes run simultaneously.

b. Its a process in which two or more parts of same process run simultaneously.

c. Its a process in which many different process are able to access same information.

d. Its a process in which a single process can access information from many sources.

  • b. Its a process in which two or more parts of same process run simultaneously.

Q. Which of these are types of multitasking?

a. Process based multitasking

b. Thread based multitasking

c. Both a & b

d. None of the mentioned

  • d. None of the mentioned

Q. Which of these packages contain all the Java’s built in exceptions?

a. javio

b. java.util

c. java.lang

d. java.net

  • c. java.lang

Q. Thread priority in Java is?

a. Integer

b. Float

c. Double

d. Long

  • a. Integer

Q. What will happen if two thread of same priority are called to be processed simultaneously?

a. Any one will be executed first lexographically

b. Both of them will be executed simultaneously

c. None of them will be executed

d. It is dependent on the operating system.

  • d. It is dependent on the operating system.

Q. Which of these statements is incorrect?

a. By multithreading CPU’s idle time is minimized, and we can take maximum use of it.

b. By multitasking CPU’s idle time is minimized, and we can take maximum use of it.

c. Two thread in Java can have same priority

d. A thread can exist only in two states, running and blocke

  • d. A thread can exist only in two states, running and blocked.

Q. Which method executes only once

a. start() method

b. init() method

c. stop() method

d. destroy() method

  • b. init() method

Q. Thread class is available in

a. javio package

b. java.lang package

c. java.awt package

d. java.util package

  • b. java.lang package

Q. Minimum threads in a program are

a. 1

b. 2

c. 5

d. Many

Q. Interfaces helps in which type of inheritance

a. Multiple inheritance

b. Multilevel inheritance

c. Hierarchical inheritance

d. None of above

  • a. Multiple inheritance

Q. Which of these exception is thrown by close () and read () methods?

a. IOException

b. FileException

c. FileNotFoundException

d. FileInputOutputException

  • a. IOException

Q. Which exception is thrown by the read ( ) method of input stream class?

a. Exception

b. ClassNotFoundException

c. read Exception

d. IOException

  • d. IOException
Subscribe Now

Get All Updates & News