Difference bet Thread and Runnable Inteface

what is the main difference bet Thread and Runnable interface. Where it is used Thread and Where it is used Runnable interface

http://www.javaworld.com/javaworld/jw-04-1996/jw-04-threads.htmlThere are a lot of differences, see the article above for details.
Generally, I would only extend Thread if I want to enhance/extend the functionality of how Threads work (like providing a Timer or a Clock, or something). If all I am doing is providing some work to be done in a separate thread, then I will create a class that implements Runnable and run it using new Thread(myRunnable).start(). Most of the time, I use Runnable, since rarely would I need to change how threads act.

Similar Messages

  • What is interactive report , difference bet interactive and classic report

    what is interactive report , difference bet interactive and classic report

    Hi
    Check this thread to get more idea about ALVs.
    Interactive ALV
    DIRLL DOWN AND INTERACTIVE REPORT
    http://www.sap-img.com/abap/difference-between-drilldown-report-and-interactive-report.htm
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
    And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
    We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
    Events associated with Interactive Reports are:
    AT LINE-SELECTION
    AT USER-COMMAND
    AT PF<key>
    TOP-OF-PAGE DURING LINE-SELECTION.
    HIDE statement holds the data to be displayed in the secondary list.
    sy-lisel : contains data of the selected line.
    sy-lsind : contains the level of report (from 0 to 21)
    Interactive Report Events:
    AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.
    AT PFn: For predefined function keys...
    AT USER-COMMAND : It provides user functions keys.
    TOP-OF-PAGE DURING LINE-SELECTION :top of page event for secondary list.
    http://abapprogramming.blogspot.com/search/label/INTERACTIVE%20REPORT%20BASICS

  • Difference bet  se09 and se10

    Hi all
    pls tell the  difference bet  se09 and se10
       Regards.
    Nagendra.

    hi nagendra,
    chk this thread:
    https://www.sdn.sap.com/irj/sdn/profile?userid=3498743
    SE09 transaction is for workbench transport request wherein the developers can track their changes or modifications to the workbench objects . 
    Whereas SE10 is a customising transport request transaction.this is used for displaying customising requests. Sometimes this may be restricted to business analysts.
    regards,
    keerthi

  • Difference Bet Transformation and InfoSource

    Difference Bet Transformation and InfoSource
    Please search the forum before posting a thread
    Edited by: Pravender on Sep 7, 2010 12:16 PM

    Hi,
    Infosource connects data source with Transformation (with transfer structure and communiocation structure).
    Transforation is same as Update rule in 3.x. It connects one object to another and do the conversion/look up data load (if needed).
    You may look for various documenat available at forums for the same.
    I hope it will help.
    Thanks,
    S

  • Difference bet Authorized and unauthorized FC revaluation

    <Deleted original post contents and retypes in capitalized alphabet - moderator >
    What is the difference bet Authorized and unauthorized FC revaluation
    Edited by: Arun Varadarajan on Sep 1, 2008 10:58 PM

    solve

  • Difference Bet. rz01 and sm37

    Dear All,
    What is the use for RZ01 and what is the difference bet.. RZ01 and SM37.
    Regards
    Shankar.

    Thanks resolving the Query.
    few question i have doubt.
    1)           what is listener
    2)           Can i shift the control file to different folder / location in Oracle.
    3)           Can anyone please guide the Homogeneous copy process  steps.
                  in SAP Note little bit confused like 
    Regards
    SNB

  • Difference between Thread and Process

    Hi!
    I was googling about this subject, and I found this old thread on google: http://forum.java.sun.com/thread.jspa?threadID=580508&messageID=2939031
    My specific doubt is: can one thread inside in a process affect other thread inside in other process?
    But, actually, the terms thread and process are not clear for me yet. I don't know what is the exact difference yet.

    > If I start a JVM, and Microsoft Word, and a web
    browser, that's three processes. A process is an
    OS-level construct.
    Threads refer to concurrent execution paths withina
    given process. Just like multiple processes canrun
    in parallel within the OS, so can multiple threads
    run in parallel within a process.
    That's exactly what I understood. So, I suppose that
    a thread in a process cannot affect other thread in
    other process, can it?Not at the Java language level.
    I mean, the wait( ), notify(
    ), etc, methods do not make sense if you consider
    threads of different process, right?Right. Those are just methods that you call on objects. The same rules apply to them as to other methods. Now, with RMI, it might be possible to call wait(), etc. on a remote object. I've never use RMI, but I don't think that actually works. If it does, I expect it would be in an RMI tutorial.
    Indeed, very confusing. They could facilitate,
    defining a clear distinction between thread and
    process.Well, there is a distinction in their "interface," if you will. It's just that their implementations can overlap.
    Kind of like how a List and a Set are different, but you could implement a Set by composing it with a List.

  • What is the difference between thread and task

    hi ,this is guruvulu bojja
    what is the diff between thread and task .
    can u give me the example for distinguish a thread and a task .
    How can i know thread is better than a task .
    please tell me what is the task in o/s level and task.
    <b>how the o/s distinguish a therad and task.</b>

    Hi Guruvulu,
    <b>Threads</b> enhance performance and functionality by allowing a program to efficiently perform multiple <b>tasks</b> simultaneously.
    In the case of <i><b>common memory</b></i> <b>threads</b> naturally have shared data regions while it has to be specially created and initialized for <b>tasks</b>.
    Simply put, a <b>thread</b> is a program's path of execution. It allows execution of two or more sections of a program at the same time.
    Regards,
    Pooja.

  • Difference bet  Billing and invoice

    Hi All
      pls tell the difference  between  Billing and invoice.
    Regards
    Nagendra

    Hi ,
             Both are the same .
    Becuase it is called Billing Invoice .
    Invoice is document indicating to delivery goods and Billing is  a receipt of payment .
    Please reward if useful.

  • Difference bet rep and descrete mfg.

    what is the basic difference between repetitive and discrete manufacturing?

    Hi,
    Discrete Manufacturing:
    1.Oredr related production
    2.Steadily changing product
    3.differing sequence of different work centers
    4.complex routing
    5.Interim storage for semi finished products
    6.Material staging order based ( reservation, picking)
    7.Back flushing per order
    8.cost monitoring order based
    Production order
    Repetitive Manufacturing:
    1.Quantity and period based Production
    2. same/ similar products are produced over a long period of time
    3.line based continuous flow
    4.simple routing
    5. No interim storage for semi finished products
    6. material staging period based
    7. back flushing period and qty based
    8.cost monitoring period based Product cost collector
    9. Planned order ( run schedule qty)
    Regards,
    nandha

  • Difference bet configuration and customization

    hi,
    I want a brief explanation about configuration and customization.
    can any one help me out
    thanx and regards
    pavan

    Dear Pavan,
    The difference between cutomizing and configuration is:
    - CONFIGURATION: we will configure the system to meet the needs of your business by using the existing data.
    - CUSTOMIZING: we will customise or adapt the system to your business requirements, which is the process of mapping SAP to your business process.
    - CLIENT: A client is a unique one in organizational structure, can have one or more company codes. Each company code is its own legal entity in finance.
    Configuration vs. Customization
    When considering enterprise software of any type, it is important to understand the difference between configuration and customization.The crux of the difference is complexity. Configuration uses the inherent flexibility of the enterprise software to add fields, change field names,modify drop-down lists, or add buttons. Configurations are made using powerful built-in tool sets. Customization involves code changes to create functionality that is not available through configuration. Customization can be costly and can complicate future upgrades to the software because the code changes may not easily migrate to the new version.Wherever possible, governments should avoid customization by using configuration to meet their goals.Governments also should understand their vendor's particular terminology with regard to this issue since words like "modifications" or "extensions" often mean different things to different vendors
    Hope this helps you.
    Do award points if you found them useful.
    Regards,
    Rakesh

  • Difference bet rsbdcbtc and rsbdcsub

    hi experts,
    can any one give me the difference between rsbdcsub and rsbdcbtc.
    Thanks

    HI,
    RSBDCSUB
    Processing Sessions Automatically
    Use
    In most cases, batch input sessions can be processed automatically. It is not necessary for a session to wait until a system administrator explicitly starts the processing of the session.
    This section explains how to have sessions started automatically soon after the session has been generated in an R/3 System.
    Prerequisites
    The ABAP program RSBDCSUB must be scheduled as a periodic job in the R/3 background processing system. RSBDCSUB checks for and starts any batch input sessions that have not yet been run. It schedules such sessions for immediate execution in the background processing system.
    Procedure
    Schedule RSBDCSUB to run periodically in one or more background jobs.
    If you have regularly scheduled batch input runs, you can schedule separate jobs for each of the scheduled data transfers. The start time for the RSBDCSUB job can be set according to the batch input schedule. And you can use a variant to restrict RSBDCSUB only to the batch input sessions that you expect.
    With RSBDCSUB, you can use all of the selection criteria offered on the batch input main menu to select sessions to run:
    session name
    date and time of generation
    status: ready to run or held in the queue because of errors
    Result
    Batch input sessions are started automatically rather than by hand. The RSBDCSUB program can be set up to start all sessions that arrive in an R/3 System, or it can be fine-tuned to start only batch input sessions that you expect.
    for RSBDCBTC check the link!!
    http://sapabap.iespana.es/sap/oss/0015999.htm
    BDC
    Regards Rk

  • Difference bet DropdownbyIndex and byKey....??

    Dear Experts,
    My task is to have two dropdowns
    say  for example...
    In the first dropdown i need to have 5 Countries where i should select one of the  choices
    *Corresponding to the country selected, it should give 5 cities where in here no selection should be done.just displaying in this dropdown.
    Please suggest me the dropdown i should use here... and also the steps,properties and the mapping for this task...

    Hi Vinod,
    As suggested by Valery, in the Supply Function get the Country and populate the States node with corresponding values.
    Difference between DropdownbyIndex and byKey is:
    DropDownByKey provides static data in DropDown and DropDownByIndex makes it dynamic.
    DropDownByKey: Is used when u want to use data dictionary type.For this create a dictionary of simple type in the dictionary.
    Creating the Simple Type:
    Ur project>dictionaries>Data Types-->Simple Types right click and select Create Simple Type.
    After entering the name and package, open that and click on "enumeration" tab at the bottom of the same. Now add the Value and Description to be displayed.The created simple type can be used for DropDownByKey.
    Binding it to the UI element:
    Now create a valueattribute and change the type to the dictionary type(created simple type). Finally bind the DropDownByKey UI element to the value attribute.
    DropDownByIndex: Is used while we have to get the data from the database. Here we directly bind the DropDownByIndex UI element to the context node(attribute).
    Regards,
    Jhansi

  • Thread and Runnable

    Can anyone please tell me why this code is not executing
    FirstClass second=new FirstClass("i m 2nd class");
         second.run();
    in the below program.
    its show the output like:
    i m 3rd class
    i m 4rd class
    i m in threadi m 3rd class 0
    i m 1st class
    i m runnablei m 1st class 0
    i m in threadi m 4rd class 0
    i m runnablei m 1st class 1
    i m in threadi m 3rd class 0
    i m runnablei m 1st class 2
    i m in threadi m 4rd class 0
    i m runnablei m 1st class 3
    i m in threadi m 3rd class 0
    i m runnablei m 1st class 4
    i m in threadi m 4rd class 0
    i m runnablei m 1st class 5
    i m in threadi m 3rd class 0
    i m runnablei m 1st class 6
    i m in threadi m 4rd class 0
    but it didnot tell me about 2nd runnable class why ?
    public class MainClass {
    public static void main(String[] args) {
         SecondClass third=new SecondClass("i m 3rd class");
         third.start();
         SecondClass fourth=new SecondClass("i m 4rd class");
         fourth.start();
         FirstClass first=new FirstClass("i m 1st class");
         first.run();
         FirstClass second=new FirstClass("i m 2nd class");
         second.run();
    class FirstClass implements Runnable{
         private int count;
         private String sq;
         public FirstClass(String str) {
              count=0;
              sq=str;
              System.out.println(str);
    public void run() {
         while(true){
         System.out.println("i m runnable" + sq+ " " +count);     
         try {
         count++;
    Thread.sleep(500);
         } catch (InterruptedException e) {
    class SecondClass extends Thread {
         private int count;
         private String sq;
         public SecondClass(String str) {
              count=0;
              sq=str;
              System.out.println(str);
    public void run() {
    while(true){
         System.out.println("i m in thread" + sq+ " " +count);
         try {
         Thread.sleep(1000);
         } catch (InterruptedException e) {
    }

    The reason behind this is that, whenever you implement Runnable in a class and invoke the run() method, no other threads can start after that call. So when you invoke first.run(), the thread "i m 2nd class" doesn't start, i.e,
    SecondClass third=new SecondClass("i m 3rd class");
    third.start();
    SecondClass fourth=new SecondClass("i m 4rd class");
    fourth.start();
    FirstClass first=new FirstClass("i m 1st class");
    first.run();
    // this thread won't start and hence the result
    FirstClass second=new FirstClass("i m 2nd class");
    second.run();
    If you had called the run() at the beginning of the program, then neither of the threads would have started
    FirstClass first=new FirstClass("i m 1st class");
    first.run();
    // none of the threads would start
    SecondClass third=new SecondClass("i m 3rd class");
    third.start();
    SecondClass fourth=new SecondClass("i m 4rd class");
    fourth.start();
    FirstClass second=new FirstClass("i m 2nd class");
    second.run();
    and that's the reason for your output!

  • Difference bet  XI and PI

    Hello friends,
    can any one tell me the exact difference betweenXI and PI ?
    regards,
    simran

    Hi,
    This question has been answered many times in many threads use the search option before posting the questions.
    No Major difference as such...
    1. All new features for XI 7.0 are almost same as for XI 3.0 at least till SPS 19.
    Some differences are as follows:
    • Adapter Enhancements like JMS, JDBC, Oracle-JDBC and CIDX Enhancements
    • New Conversion Agent,
    • Receiver Determination Enhancements
    • Multi mapping
    • User defined enhancements
    • Unbounded Processes (Integration Processes).
    2. One more difference is the ABAP stack (which is 7.0 and not 6.40) but from the developer point of view there is nothing new.
    3. PI 7.0 = XI 7.0 i.e. PI 7.0 can also be called as XI 7.0
    4. For each SP in XI3.0 there is a corresponding SP being released for PI (XI 7.0). A comparison of the service packs in 2004 and 2004s:
    In 2004 - In 2004s
    SP12 & lower = SP04
    SP13 + 14 = SP05
    SP15 = SP06
    SP16 = SP07
    SP17 = SP08
    SP18 = SP09
    Thnx
    Chirag

Maybe you are looking for

  • After upgrading to Mountain Lion from Lion, Mail, Safari and note need about five minutes to start.

    After upgrading to Mountain Lion from Lion, Mail, Safari and Note need about five minutes to start. After starting, Mail answers are very very slow. The same for Note. Instead of, sending mails is only a bit slower than before upgrading. In Safari, I

  • G40 Video noise and blank

    Upon startup, myG40 shows the POST page, then I hear a high pitch noice briefly, and the display goes dark. The external video connector does work, but the lcd screen stays dark. I have a second machine that I can use for parts.  Can someone recommen

  • Bootcamp on dual hard drive setup

    Hi all you Applefolks, I'm having a serious problem installing Win 7 with Bootcamp on my MacBook Pro Mid 2012 13" non-retina (MacBookPro9,2). Currently I'm running Mac OS X 10.9.2 (13C64). I used my MacBook Pro with Bootcamp on the partitioned origin

  • Registry Settings used by itunes missing even after troubleshooting?

    Dell recently came out to replace a bad optical drive on my 9 month old desktop using Windows 7. Everything was working properly when this morning I tried to start itunes and I received the error message "The Registry Settings using by itunes drivers

  • Where is the location for filter plugin dialog in AI CS4?

    Hello All, Im using CS4. In CS4 SDK sample projects, "Tutorial" is a filter type plugin and I want to test this plugin. Project is compiled fine and plugin created. Placed this plugin in plugins folder of AI. and then started AI. The Tutorial plugin