logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology See What Others Are Saying!
  • Question
  • What is the difference between creating a thread by extending Thread class and by implementing Runnable interface? Which one should prefer?


  • Correct Answer
  • When creating a thread by extending the Thread class, it is not mandatory to override the run method (If we are not overriding the run method , it is useless), because Thread class have already given a default implementation for run method But if we are implementing Runnable , it is mandatory to override the run method The preferred way to create a thread is by implementing Runnable interface, because it give loose coupling 


  • More questions

    • 1. Which one of the following sorts rows in SQL?

    • Options
    • A. ORDER BY
    • B. GROUP BY
    • C. SORT BY
    • D. ALIGN BY
    • Discuss
    • 2. What is the meaning of ABAP editor integrated with ABAP data dictionary?
    • Discuss
    • 3. Which one of the following is not a 'Money Market Instrument'?

    • Options
    • A. Commercial Paper
    • B. Equity Shares
    • C. Certificate of Deposit
    • D. Treasury Bills
    • Discuss
    • 4. What is onshore outsourcing?
    • Discuss
    • 5. What is the Use of SPAN in HTML and give one example?
    • Discuss
    • 6. .What are the different types of environments available in the web?
    • Discuss
    • 7. What is web portal?
    • Discuss
    • 8. What is web application?
    • Discuss
    • 9. Describe a time when your workload was heavy and how you handled it?
    • Discuss
    • 10. Describe a time when you made a mistake ?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment