Results 1 to 3 of 3
  1. #1
    hitesh_public is offline Member
    Join Date
    Aug 2010
    Posts
    9
    Rep Power
    0

    Default What is the meaning of this statement in the book?

    Hi,

    During my study of Multithreaded programming, I came across a statement which I want to understand properly. Please help me in understanding this statement.

    "Runnable abstracts a unit of executable code."

    Thanks a lot

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,729
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by hitesh_public View Post
    Hi,

    During my study of Multithreaded programming, I came across a statement which I want to understand properly. Please help me in understanding this statement.

    "Runnable abstracts a unit of executable code."

    Thanks a lot
    You can tell a Runnable to run() something. The interface Runnable specifies that but it doesn't specify what to run exactly; it's an abstraction that you have to define by implementing a class that implements the Runnable interface.

    kind regards,

    Jos

  3. #3
    go4soumya is offline Member
    Join Date
    Oct 2010
    Posts
    32
    Rep Power
    0

    Default understanding

    I don't know if this answer wud satisfy you, but to state very simply:

    Runnable is an interface that u 'implement' in your class while writing thread programs. I'm sure, you must have the idea of an interface as u're studying multi-threaded programming where you can implement the Runnable interface whose instances are intended to be executed by a thread other than extending the thread class. So when u implement Runnable u're actually associating a "unit of executable code". But that unit of code is abstracted from u, and you just need to override the run() method as you might be aware of!

    got that??.....

Similar Threads

  1. Explain the meaning of each word
    By saichandra in forum New To Java
    Replies: 1
    Last Post: 09-24-2010, 05:28 PM
  2. Idea for Meaning Translation
    By OmerHalit in forum AWT / Swing
    Replies: 5
    Last Post: 07-08-2010, 08:19 PM
  3. for loop meaning
    By ahmakki in forum New To Java
    Replies: 3
    Last Post: 04-12-2010, 02:06 AM
  4. Exception:Meaning
    By tiger100plus in forum New To Java
    Replies: 2
    Last Post: 11-27-2008, 08:45 AM
  5. Statement or Prepared Statement ?
    By paty in forum JDBC
    Replies: 3
    Last Post: 08-01-2007, 05:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •