File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Thread Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Thread Question" Watch "Thread Question" New topic

Thread Question

Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Which of the following statements are true?


Select 1 correct option.

1.To provide threading behaviour a class must extend Thread class.
2.To provide threading behaviour a class must explicitly implement Runnable interface.
3.Threads created by user are always non-daemon threads.
4.Thread created internally by the JVM are always daemon threads.
5.None of the above are correct.

Answer Given is: option 5

I think option 3 is correct.


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
#5 is correct. While threads created by your program are BY DEFAULT not daemon threads, you can indeed create them.

I agree. Here's the link:
subject: Thread Question
It's not a secret anymore!