Java Threads Question:

Download Job Interview Questions and Answers PDF

What is threaded programming and when is it used?

Java Threads Interview Question
Java Threads Interview Question

Answer:

Threaded programming is normally used when a program is required to do more than one task at the same time. Threading is often used in applications with graphical user interfaces; a new thread may be created to do some processor-intensive work while the main thread keeps the interface responsive to human interaction.

The Java programming language has threaded programming facilities built in, so it is relatively easy to create threaded programs. However, multi-threaded programs introduce a degree of complexity that is not justified for most simple command line applications.

Download Java Threads Interview Questions And Answers PDF

Previous QuestionNext Question
What is a working thread?Why are wait(), notify() and notifyall() methods defined in the Object class?