how many ways to create Thread and which one is good?
runnable interface ot Thread class?
Answers were Sorted based on User's Feedback
Answer / balaji@cse@crr engg@eluru
types of creating thread
1)extend thread class
2)implement by runnable interface
=>2"nd method is good because by using interface we can
implement multiple inheritance
| Is This Answer Correct ? | 16 Yes | 0 No |
Answer / guest
Two ways to create threads
1)by creating thread class
class classname extends Thread
{
}
2)By converting class to thread ie using Runnable interface
| Is This Answer Correct ? | 11 Yes | 3 No |
Answer / srinu
Two ways of creating Thread
1)By extending java.lang.Thread class
2)By implementing java.lang.Runnable interface
Here 2"nd way is good because by using interface we can
implement multiple inheritance in our class
| Is This Answer Correct ? | 7 Yes | 0 No |
Why there is no call by reference in java?
What is a nullable field?
Explain the difference between abstract class and interface in java?
How can you generate random numbers in java?
long d =10;int i =0;i=d; /// is this possible? If d is very long number (10 digits or some thing) then?
What is palindrome in java?
Difference between class#getinstance() and new operator ?
Which is faster string or stringbuilder?
Can you explain the meaning of aggregation and composition
Any one can explain how the inerface uses in java. give with example.
Which collection object is faster to retrieving the data and inserting the data into it.
2 Answers Jamcracker, Virtusa,
what is request processor?