This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Suppose there are three threads and there is one method which takes number as input and prints number.
If threads passes same number, number should print one time and if different numbers provided as input then all different number should print.
If thread1 and thread2 passes 1 as input to method and thread 3 passes 2 as input then 1 should print once and 2 should print once.
If thread 1 passes 1, thread 2 passes 2 and thread 3 passes 3 then all number should get printed as all are different.