Compilation error fixed with eclipse.
Example for thread join added.