Question
We should implement runnable interface or extend thread class. What are differences between. How can you say thread behaviour is unpredictable?

Answers

Thread behaviour is unpredictable because execution of Threads depends on Thread scheduler, thread scheduler may have different implementation on different platforms like windows, unix etc. Same threading program may produce different output in subsequent executions even on same platform.To achieve we are going to create 2 threads on same Runnable Object, create for loop in run() method and start  both threads. There is no surety that which threads will complete first,  both threads will enter anonymously in for loop.
    Your Comment




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

What is software configuration management?

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?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What's the difference between an interface and abstract class?
  • Q An arrangement of flowers fastened in a ring used for laying on grave
  • Q Gross tax liability is calculated on gross total income __________.
  • Q How to Install the Remote Desktop Services in Windows Server 2012?
  • Q How to create axes in the graph?
  • Q Phillipines became independent in
  • Q Over several years from the late 1900s to the early 2000s, plant breeders succeeded in optimising all but which one of the following appealing characteristics of cut roses, which consequently reduced: Colour/color; Shape; Shelf-life; or Scent?
  • Q As at 2011 what car corporation owns the Rolls Royce and Mini marques?
  • Q What is the frequency at which VOICE is sampled?
  • Q How do you extend a material, which transaction?
  • Q What are the accounting principles?