simple misunderstanding of a java
<p>Here is the code. It is a bill class.  </p>

<pre><code>    import java.util.ArrayList;
    import java.util.List;

    public class Bill {

        private List&lt;BillRow&gt; rows;
        private String name;

        public Bill() {
            rows = new ArrayList&lt;BillRow&gt;();
        }

        public void addBillRow(BillRow br) {
            rows.add(br);
        }
}
</code></pre>

<p>So the question: How can I add a row to the bill?</p>

<pre><code>public class BillTest {

    // Bill row costs (reused)
    private static double cost1 = 452.12;

    //addBillRow(cost1); Why here is an error?
</code></pre>

<p>I do not understand why there is an error. Please help. Thanks!</p>
