Results 1 to 4 of 4
Thread: threads
- 05-24-2011, 09:27 AM #1
Member
- Join Date
- May 2011
- Posts
- 1
- Rep Power
- 0
- 05-24-2011, 04:13 PM #2
Member
- Join Date
- May 2011
- Location
- Herentals, Belgium
- Posts
- 14
- Rep Power
- 0
Because java doesn't support Multiple Inheritance... You can make a thread by making your class a subclass of Thread(extends Thread), but I your class is already a subclass of something other you cannot use the "extends Thread" any more. In that case there is option 2: Implementing Interface Runnable which let you also create a thread. You are not restricted using Interfaces, a class you create can only extend one superclass, but can Implement more than one Interfaces.
And hey that what's programming is all about... You can do the simplest thing is way more than one way!!
If I can give you a hint, focus on the implementing interfaces for creating threads, I find it the best way, u can always use this way!!
PeaceEnjoy your milk!! :cool:
- 05-24-2011, 04:55 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,375
- Blog Entries
- 7
- Rep Power
- 17
- 05-24-2011, 08:07 PM #4
Member
- Join Date
- May 2011
- Location
- Herentals, Belgium
- Posts
- 14
- Rep Power
- 0
Similar Threads
-
Threads and UML
By JUser in forum Advanced JavaReplies: 0Last Post: 09-27-2010, 08:43 PM -
Threads
By Tanuck in forum New To JavaReplies: 5Last Post: 09-21-2010, 02:44 AM -
Threads
By GoLuM83 in forum Advanced JavaReplies: 7Last Post: 03-31-2010, 08:52 PM -
Threads!
By rameshraj in forum Advanced JavaReplies: 1Last Post: 05-04-2008, 04:11 PM -
Using threads
By Java Tip in forum Java TipReplies: 0Last Post: 12-11-2007, 10:25 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks