intermediateMultithreading & Concurrency304 of 436
Difference between Thread class and Runnable interface
Tests whether you know implementing Runnable (and passing it to a Thread) decouples the task from Java's single-inheritance limit and lets the same task be reused across executors, unlike extending Thread directly.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response