title: Java element-wise sum 2 arrays
body: <p>Given that I have two arrays in Java, <code>A</code> and <code>B</code> I want to add the elements, element-wise, which results in a sum array. Doing this implicitly with a loop is easy but I was wondering if there was a more elegant solution, perhaps with the guava collections or build in java utils. Or perhaps a python-ish way which makes is easy with list comprehensions.</p>
  
  <p>Example:</p>
  
  <pre><code>A   = [2,6,1,4]
  B   = [2,1,4,4]
  sum = [4,7,5,8]
  </code></pre>