Multiple choice technology

Threads are used:

  1. To maintain multiple contexts

  2. To allow a Java program to do several things at the same time

  3. Only to hold the seams in the programmer's trousers.

  4. As a debugging tool to allow the programmer to trace back once a Java program has completed its operation

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Threads enable concurrent execution - a Java program can perform multiple tasks simultaneously like handling UI while processing data in background.