0

I already had a similar question, to which I was helped to answer. Multithreaded summation of an array without using join () It is successfully closed. However, now the question is not to use the java.util.concurrent library. My mentor says it's possible.

I have no idea, except how to implement my own join () inside which is used wait () and isAlive ()

J.doe
  • 13
  • 4
  • I hate silly homework assignments. "Don't use this obvious construct because I say so." :( – Tudor Jul 11 '18 at 11:40
  • @Tudor I understand you so well. In real life, this task will never occur. – J.doe Jul 11 '18 at 11:41
  • 2
    Dont know if your mentor will like this or not but give a try `Arrays.asList(intArray).parallelStream().mapToInt(Integer::intValue).sum();` – Rahul B Jul 11 '18 at 12:03

0 Answers0