Link Details

Link 1176691 thumbnail
User 1258703 avatar

By Ilias_Koutsakis
via examples.javacodegeeks.com
Published: Jul 06 2014 / 22:36

In this example we will take a look into the Runnable interface in Java, and how it can be used in association with the Thread class to create and execute new threads in your program. We will also try to explain what a Runnable is and what’s the difference from Thread, as well as take a look into the different ways that you can implement Runnable in your code.
  • 11
  • 1
  • 365
  • 1139

Comments

Add your comment
User 776377 avatar

lburnham123 replied ago:

0 votes Vote down Vote up Reply

Callable and Future are more functional alternatives to Runnable, and an Executor would be a better way to handle concurrent tasks.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java