GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Programming  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 96 of 928    Print  
What is the 2 way of creating a thread ? Which is the best way and why

  
Total Answers and Comments: 1 Last Update: September 01, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 01, 2005 15:20:40   #1  
reena sahoo        

RE: What is the 2 way of creating a thread ? Which is the best way and why
1. Extending the Thread class.
2. implementing the Runnable interface.

and implementing the Runnable interface is best way as in Extending Thread class u cannot extend any other class. but in Implementing Runnable interface u can extend any class u need.

 
Is this answer useful? Yes | No

 Related Questions

As of now ,what i know abt cloning is that we can make a field to field copy of an object.ie when we clone an object,its state as well as a its behaviour is copied to the cloned object.My question is what is the neccesity of it? cant we create another object of the same class? so how does its different from cloned object (that is creating another object of that class rather than  being cloned).is there any security issues coupled with this cloned object? And What is the Concrete purpose of

Latest Answer : Thread is a single sequence of execution within a process. ...

Latest Answer : 1. Extending the Thread class. 2. implementing the Runnable interface.   and implementing the Runnable interface is best way as in Extending Thread class u cannot extend any other class. but in Implementing Runnable interface u can extend ...

Latest Answer : "thread.isAlive()" this is the method. Regards Mohan ...

Latest Answer :        It is interthread communication,this is performed using        Wait(),notify() and notifyall() ...


Latest Answer :          least priority thread ...


Suppose If we have variable ' I ' in run method, If I can create one or  More thread each thread will occupy a separate copy or same variable will be shared

Latest Answer : Not possible ...


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Creating XML with the DOM PHP Extension

Creating XML with the DOM PHP Extension In fact the PHP DOM extension is a set of classes that can be used to generate access and manipulate XML data The DOM php script defined in the following listing shows how to generate an XML document based on the result set retrieved from the database mosgoogl
 

Microsoft AJAX Library - Creating Object Members on the Fly

Creating Object Members on the Fly One major difference between OOP in C and ASP NET and OOP in JavaScript is that JavaScript allows creating object members on the fly" This is true for objects and classes that you create yourself and also for JavaScript s own objects and types as well He
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

Creating Virtual Business Network

Requirements of Virtual Business Network The sudden expansion of electronic commerce has resulted in many changes in the way business is done globally The virtual business network is the buzz word among the business communities internet community and freelance work seekers Traditional business strat
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape