Difficulty: Easy
Correct Answer: 1..2..
Explanation:
Introduction / Context:
The distinction between Thread.start() and Thread.run() is fundamental in Java concurrency. start() creates a new thread of execution and then invokes run() on that new thread. Calling run() directly executes the method on the current thread (here, main), with no concurrency.
Given Data / Assumptions:
Concept / Approach:
The loop bounds are i = 1; i < 3; ++i → values 1 and 2. Because run() is called like a normal method, it executes on the main thread and simply prints text; there is no second thread involved, but the output tokens are unaffected.
Step-by-Step Solution:
Verification / Alternative check:
If t.start() were used, the same text would print, but on another thread and with potential interleavings with other concurrent output.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing run() for start(); expecting new-thread behavior without calling start().
Final Answer:
1..2..
Discussion & Comments