Difference between implements thread and ex

what is the difference between extending the thread and implements the runnable interface..?

Not much. One reason to prefer implementing the Runnable interface as oppossed to extending Thread is to allow your class to extend a diifferent base class if you choose to do so. Since Java supports single implementation inheritance it is always a good idea to implement Runnable as oppossed to extending Thread in case you want to extend some other class, besides Thread, now or in the future.
Some OO purists may also claim that unless your class (that extends Thread) "is a" specialized Thread that extending Thread breaks the OO sematics of the "is a" relationship that inheritance is suppossed to represent. For instance a widget class that draws a pixel randomly on the screen that needs to be run in it's own Thread really isn't a specialized Thread class.

Similar Messages

  • Differences between  hardware thread and software thread?

    Hi ,all!
    The Instructions of SPARC V9 have nothing about thread ID. And there are two bits of CCX packets indicating thread ID.
    Does it mean that CCX generates the thread ID of SPARC core?
    And, what are the differences between hardware thread and software thread?
    Thanks in advance!

    Hi ,all!
    The Instructions of SPARC V9 have nothing about
    thread ID. And there are two bits of CCX packets
    indicating thread ID.
    Does it mean that CCX generates the thread ID
    of SPARC core? Each SPARC core has one unique ID to identify itself when it receives packets, such as CCX packets, interupt packets and so on. Such ID is defined in the Hyperprivileged register. Maybe you can see UA2005-current-draft-HP-EXT.pdf for more information.
    And, what are the differences between hardware
    thread and software thread?
    Thanks in advance!Software thread runs on the hardware thread (or strand).

  • Difference between implementation guide and user guide.

    Hi All,
    I am a recent graduate, just wanted to know what is teh Difference between implementation guide and user guide.
    Sorry the question may sound to simple but I am not aware of the aswer.
    Regards,

    Hi,
    The implementation guide is the reference that you need to use to do the functional setup while the user guide covers how the navigation of the module/application and tells you how to use it.
    Thanks,
    Hussein

  • What is the difference between new thread and new execution?

    What is the difference in creating a new thread and a new execution. Basically, what is the difference between thread and execution?

    Try this link...
    http://zone.ni.com/devzone/cda/tut/p/id/4823
    Thanks,
    PH

  • Difference between impelementation rules and business logc.

    Hi all,
    Please tell me what is the exact difference between implementation rules and business logic?And more importantly when and where they should be used?
    Thanks in advance.
    Regards,
    Jayant Gupta

    Hi vasu,
    from the point of view of possible transformation there are not differences.
    The great difference is the following:
    In Update Rules routines are defined for a single field for every key filed: for example you define the single routine for 0AMOUNT for every single Characteristic that define the key (0COSTCENTER - 0COSTELEMENT - ...). For every single DataField you can define a different routine also in terms of Key fields.
    In transfer roules every routine is for every field without any kind of relation to the other fields.
    Check also this doc:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/dc43c445-0d01-0010-23a1-ca348ff5f975">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/dc43c445-0d01-0010-23a1-ca348ff5f975</a>
    Ciao.
    Riccardo.
    Message was edited by: Riccardo Venturini

  • Difference between EDN-DB and EDN-JMS implementation

    Experts,
    Looking for a difference between EDN-DB and EDN-JMS implementation. We have EDN implementation going on, where multiple source systems will be publishing business events. Events can be published using SOA Suite or JMS Bridge from AQ and MQ. In this scenario which implementation approach is suited better ?

    Oracle Apps Adapter can be used for many other products other than E-Business Suite (JD Edwards E1, OTM, and others).  The apps adapter was mainly used in ERP systems and was strong when you needed have added functionality other than just polling a db for a status / calling a stored procedure...  It could connect out to other business services, xml gateways and so-on.
    From a technical aspect / development perspective I always thought of that the Oracle Apps Adapter simplifies the development but, may is not flexible. The App Adapter's strength is the services that are difficult to integrate with (business services, xml gateway). If you need to hook in to these types of services, use the APPS adapter. (Again like it is named the "Apps Adapter" its for interacting w/ other applications to enable real-time processing / functionality. 
    That being said the dbAdapter can be very powerful but, like it is named is database focused (to poll some table to know when to kick off other logic and enable real-time functionality through database interaction.
    Looking at the Oracle 12C Roadmap I had heard that there is more planned for the Oracle Apps Adapter moving forward, especially as Anuj said in the "Financial Apps" side of the isle at Oracle. Who knows what is real and what isn't though =]
    Hope this helps!
    -Luke

  • Difference between implements and extends

    Hi all,
    what is the difference between implements and extends. i am sorry to ask this silly question, but i am new to JAVA.
    Thanks
    Balaji

    when you extend a class, your class that you are coding inherits every method and field from the extending class. For example:
    public class CustomFrame extends JFrame {
    //Your class's methods will be in here, but so will all of JFrame's methods.
    }You can override (most) methods from extended classes if you want them to do different things than they normally do. The most commonly overriden methods when using swing are stuff like paint(Graphics g). It needs to be overriden to repaint all of the components.
    When you imlpement something, you have to specify an interface. Interfaces have methods in them with no code. If you implement an interface, all methods in in must be defined. If not, the code will not compile. Some interfaces like ActionListener extend other classes to perform stuff. The actionPerformed(ActionEvent e) method will perform an action when a button is pressed, etc.

  • Difference between Implement and Extend

    what is the difference between implements and extends and why do we use them
    thanks,

    classes extend one other class and implement as many
    interfaces as they wish.
    interfaces extend as many interfaces as they wish.But for all that, they both just mean "inherits."
    There wouldn't even have to be two different words, since you never have a choice between X extends Y and X implements Y. For a given X and Y, only one of the two will be legal.

  • Difference between roll out and implementation

    Dear sapians,
    What is the major difference between roll out and ene to end implementation ?
    Is it  possible to rollout to N no of plants?
    Gururajan .A

    The most important thing to do if you are planning to carry out an implementation followed by several roll-outs, is to do the analysis of the business processes across all potential future sites and not just try to use one central example.
    In one implementation I joined they had used a small site as the blueprint because this site was easier to manage and it used most of the areas of SAP. But when it came to rolling out the solution, the first few roll outs went well (because the sites were of a similar size to the original site), but then when a major site was to be rolled out to there were MAJOR problems. In the small initial site some users were carrying out many roles / tasks, but in the large site that we were rolling out to there were several users to each role / task and this meant a redesign of most of the processes and different configuration.
    So design for as many sites as you can and then you can roll out, don't just do the design for the initial sites then try to roll out.
    Steve B

  • Difference between v$instance and v$thread

    Hallo,
    What is the difference between v$instance and v$thread?
    Thanks,

    Well, a mere description of the views in the official documentation isn't going to actually help you very much more than you could do with a simple "desc V$instance/desc V$thread", I suspect.
    The answer I think you might be looking for is that a thread is not the same thing as an instance. In fact, we usually talk about "a thread of redo", which gets much closer to the issue here. Yes, it is true that one instance can only generate one 'thread of redo', so one instance = one thread, and there's a temptation to extrapolate from that and assume they're the same thing.
    But they're not. An instance is a set of memory structures and processes. It has a name. It gets started and stopped. In can be running in various states (nomount, mount, open, read-only, primary, secondary etc).
    A thread of redo is a history of redo generated by an instance. It has ever-incrementing checkpoint change numbers, times of last checkpoints, sequence numbers, blocks of redo that are forever being flushed to different parts of the current redo log. And so on.
    Thus, V$INSTANCE tells you the state of the instance and V$THREAD tells you all you could ever want to know about where you're up to in the writing-redo stakes.

  • Difference between LockSupport.parkUntil and Thread.sleep method

    Hi
    Could someone please explain the difference between LockSupport.parkUntil and Thread.sleep methods.
    Thanks in advance.

    javaLearner wrote:
    The thing that I am trying to understand is - the difference / correlation between the two methods mentioned.
    In the javadoc, there is a mention of correlation between the LockSupport methods park, unpark and the Thread methods suspend, resume - but not park and sleep.Then that suggests that there isn't any difference /correlation -- whatever you meant by that. Perhaps your question is like asking for the difference between a fish and a bicycle.
    Also, I would like to understand the statement
    These methods are designed to be used as tools for creating higher-level synchronization utilities, and are not in themselves useful for most concurrency control applications. (from the javadoc)Again, you're going to have to explain what you don't understand about it.

  • Difference between Application.CurrentCulture and Thread.CurrentCulture

    Can someone tell me the difference between Application.CurrentCulture and Thread.CurrentCulture.
    Thread has CurrentCulture and CurrentUICulture. But Application has only CurrentCulture. Why?
    (https://msdn.microsoft.com/en-us/library/system.windows.forms.application.currentculture(v=vs.110).aspx)
    (https://msdn.microsoft.com/en-us/library/system.threading.thread.currentculture(v=vs.110).aspx)

    1)
    Application.CurrentCulture delegates to Thread.CurrentThread.CurrentCulture("Gets or sets the culture information for the current thread") so it only sets it for the main thread of the
    application.
    2) They are both properties of a Thread object, which you can access via Thread.CurrentThread.
    CurrentCulture – Tells you the user’s current locale, as set in the Region
    applet.  I.e.: Where is the user located?
    CurrentUICulture – Tells you the native language of the version of Windows
    that is installed.  I.e.: What language does the user speak?
    The user can change CurrentCulture using the Region applet.  It’s used to determine formatting for numeric and date/time
    strings.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Whats the difference between implements and extends!??

    Can an interface be extended or not??
    If it can whats the difference between implements and extends??
    Thank you!

    Code Sample:
    interface a implements aa{This is illegal. An interface cannot implement another interface. It can only extend another interface.
    interface a extends aa{That's the way to do it. As already said above:
    An interface can only extend another interface.
    A class can extend another class.
    A class can implement zero or more interfaces.
    So, "implements" is only used for classes that implement interfaces. For the rest, "extends" is used.

  • Difference between Interactive report and ALV Interactive report.

    What is the difference between Interactive report and ALV Interactive report.
    i think there is no much difference the same Interactive report Events and functionality we will implement with ALV.
    Experts guide me.

    Hi,
    ALV interactive report gives many advantages than interactive report like sorting, summing and getting graphics.
    An interactive report generally basic list displayed. User double clicks on any valid line or user selects a line and presses as button on the tool bar. Then the corresponding event is triggered
    refer
    http://www.sapgenie.com/abap/drill_down_reports.htm
    You can find a interactive ALV report here
    http://www.sap-img.com/abap/an-interactive-alv-report.htm
    also refer
    Below threads consist of number of interactive ALV codes:
    interactive ALV code
    ALV-INTERACTIVE.
    Interactive ALV
    Regards

  • Differences between Netweaver 2004 and Netweaver 2004s?

    Hi All,
    Can anyone please explain me in details the major differences between Netweaver 2004 and Netweaver 2004s.
    Thanks in advance
    Regards
    Henry

    Hi Henry,
      This content i got from experts:
      The code developed on 2004 will work on 2004s.
    Some minor changes have been made refer to the documentation for specific details
    SAP NW2004s is the mySAP Business Suite edition of SAP NW 2004.it is a minor release that delivers on specific needs of the mySAP and xapps solutions delivered by SAP in 2005. the "s" stands for "mySAP Business Suite Edition".
    The next major release of NW will deliver on Business Process Platform(BPP) it will be released in 2006.
    Few of the New capabilities in NW2004s
    1)Developing a web based user interface with Web Dynpro fro ABAP.
    2)Enhancements to enabling B2B processes
    3)Enhancements to business task management
    4)Enhancements to business planning
    5)Enhancements to enterprise data warehousing
    6)mass setup of mobile devices
    7)implementing a global portal
    Refer the link for more info
    http://help.sap.com/saphelp_nw04s/helpdata/en/5b/8c3842bb58f83ae10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/57/a21f407b402402e10000000a1550b0/frameset.htm
    NW04 is a 'Java version' which means you can develop applications using Java and export them to portal.
    NW04s is a 'ABAP version'.Here you can develop ABAP reports and transactions and export them to portal. There you can create iViews using them.
    Netweaver 04s, includes both the ABAP and Java stacks. The Sneak preview for NW04s is only for the ABAP stack, and the Sneak Preview NW04 SP15 is only the java stack. If you are using the sneak preview for ABAP, you can develop WDA applications and BSP applications, they run directly in the engine, not in a portal. But they can be embeded in an iView in some portal. You don't have to have a portal to run your application. If you are using the java side, you can develop WDJ applications and JSP applications. Same applies here, they run on the java engine, not in a portal, but can be embeded into an iView which runs on the portal. But you don't need a portal for your application to run. The portal is just a frontend UI, the apps themselves run on the underlying engine, whether its ABAP or JAVA.
    Refer to the following threads for more information
    Re: What is NW04 s?
    Re: Differences between NW04 SP11 and NW04 SP15
    I hope this will help you
    Regards
    Suresh

Maybe you are looking for

  • Help computer will not boot up!

    Hi, I followed the guide on PBfixit.com to replace my hard drive. After doing so, putting it back together, the computer will not start up, no chime. When plugged it it has the green light on, showing power. Help! Any suggestions would be thankful..

  • Adobe Creative Suite 6 Download and Installation Problem

    I have purchases Adobe Creative Suite 6 and went to download it.  It downloaded a Package.exe and when I ran setup it ran for hours and in the end said it was complete, but I have nothing to show for it but some Zip files and some setup files which I

  • SAP IDM Installtion on Linux

    Hello, We would like to install IDM on linux and I would like ask if any suggestions on this. I read couple of SCN Discussion and it is not clear that it can be installed on linux or not? I request you to kindly suggest me on this. Thanks and Regards

  • I need help with my bill

    We have put together a few FAQs to help with some of the questions you might have about your BT bill. Please click on the links below to find the answer you're looking for: I don't understand my bill – what do all these charges mean? Help with my ren

  • Messages - Searching for terms and finding multiple matches

    In Messages, if I search for a term, and the term is matched multiple times within a conversation, how do I look at earlier matches? Right now it will only show me the most recent.