Thread in Java
Thread in Java
In Java, every application runs with at least one thread—the main thread—but you
can create additional threads to handle background tasks.
Single-threaded: Executes one task at a time (like reading a file, then displaying
it).