Home / CSE MCQs / JAVA MCQs :: Threads - Java

CSE MCQs :: JAVA MCQs

  1. Which of these statement is incorrect?
  2. A.
    A thread can be formed by implementing Runnable interface only.
    B.
    A thread can be formed by a class that extends Thread class.
    C.
    start() method is used to begin execution of the thread.
    D.
    run() method is used to begin execution of a thread before start() method in special cases.

  3. Which of these class is used to make a thread?
  4. A.
    String
    B.
    System
    C.
    Thread
    D.
    Runnable

  5. Which of these interface is implemented by Thread class?
  6. A.
    Runnable
    B.
    Connections
    C.
    Set
    D.
    MapConnections

  7. Which of these method of Thread class is used to find out the priority given to a thread?
  8. A.
    get()
    B.
    ThreadPriority()
    C.
    getPriority()
    D.
    getThreadPriority()

  9. Which of these method of Thread class is used to Suspend a thread for a period of time?
  10. A.
    sleep()
    B.
    terminate()
    C.
    suspend()
    D.
    stop()

  11. Which function of pre defined class Thread is used to check weather current thread being checked is still running?
  12. A.
    isAlive()
    B.
    Join()
    C.
    isRunning()
    D.
    Alive()

  13. What is multithreaded programming?
  14. A.
    It's a process in which two different processes run simultaneously.
    B.
    It's 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.

  15. Which of these are types of multitasking?
  16. A.
    Process based
    B.
    Thread based
    C.
    Process and Thread based
    D.
    None of the mentioned

  17. Which of these packages contain all the Java's built in exceptions?
  18. A.
    java.io
    B.
    java.util
    C.
    java.lang
    D.
    java.net

  19. Thread priority in Java is?
  20. A.
    Integer
    B.
    Float
    C.
    double
    D.
    long