top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

When to use Thread class and When to use Runnable interface in order to create a thread??

+3 votes
303 views
When to use Thread class and When to use Runnable interface in order to create a thread??
posted Jun 27, 2015 by Prakash Singh

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

As JVM uses the primitive or time slicing scheduling techniques for thread scheduling. Is it possible to know our exiting JVM using which technique for thread scheduling?

+2 votes

I declared a variable and incremented/modified it inside Mapper class. Now I need to use the modified value of that variable in Driver class. I declared a static variable inside Mapper class and its modified value works in Driver class when I run the code in Eclipse IDE. But after creating that code as a runable jar from Eclipse and run jar file as “$ hadoop jar filename.jar input output” modified value does not reflect (value is 0) in Driver class.

...