How to add a double value and a list element which is in double?
<p>I tried a code</p>

<pre><code>double temp=0;
List list=new ArrayList();
list.add(1.1);
temp+=list.get(0); //error occurs here
</code></pre>

<p>Error that occurred is as follows</p>

<blockquote>
  <p>bad operand types for binary operator '+' </p>
  
  <p>first type: double</p>
  
  <p>second type: Object</p>
</blockquote>

<p>What should I do to add the temp value and the double value in the list?</p>

<p>The programming language that I preferred is Java.</p>
