How to safely pass parameters to threads via the constructor of a class that implements
Runnable, when lambda expressions are appropriate, and why it’s better to make fields
final. We examine thread priorities: methods
setPriority/
getPriority, constants
Thread.MIN_PRIORITY,
Thread.NORM_PRIORITY,
Thread.MAX_PRIORITY and their effect on the scheduler. Plus—naming threads via the constructor,
setName/
getName, a practical example, and common mistakes (shared
Runnable, setters, relying on priorities).