Question
What is more advisable to create a thread, by implementing a runnable interface or by extending thread class?

Answers

Strategically speaking, threads created by implementing Runnable interface are more advisable. If you create a thread by extending a thread class, you cannot extend any other class. If you create a thread by implementing Runnable interface, you save a space for your class to extend another class now or in future.   Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q which state is west of Nagaland?
  • Q Tell me about a time when you had to manage multiple events at once. How did you multitask to complete both events successfully?
  • Q Creating MFC DLLs for use with WinRunner
  • Q Can you use this() and super() both in a constructor
  • Q To verify the file, the two files are same and also check whether the data in it is also correct How to do it using verify function?
  • Q Define Request Group ?
  • Q Which country has the smallest birth rate
  • Q Discuss the recent trends in research in science learning with special emphasis to instructional strategies and assessment practices
  • Q What is the difference between gills and lungs?
  • Q What is polycythemia?
  • Q Hindustan Antibiotics Ltd,India's largest manufacturer of penicillin is located at?