Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why Thread class is not deprecated by Java

Since we are able to implement many interface such as Runnable why hasn’t Java deprecated the Thread class yet?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Extending the Thread class is not recommended. But deprecating a class indicates that it shouldn’t be used at all. And Thread is still useful as a standalone class. It’s just that the way we expect programmers to use it has changed, not that it’s become useless or outdated as a concept.

If we deprecated Thread, then most editors would raise a warning on the (perfectly reasonable) code

Thread myThread = new Thread(mySpecialRunnable);

Since that uses, in our hypothetical, a deprecated class.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading