title: Returning boolean value
body: <p>My code is this::</p>
  
  <pre><code>public Boolean calculation(){
  
          Double totalQuantitySum = 0d,totalAmountSum=0d;
          Boolean balanced=false;
          for(MaterialAcceptingRejectSheetCustomizationBean bean: materialAcceptingRejectSheetBean.materialAcceptingRejectSheetCustomizationBeanList){
  
              if(bean.totalAmount != null &amp;&amp; bean.totalQuantity!= null){
  
                  totalQuantitySum += bean.totalQuantity;
  
                  totalAmountSum += bean.totalAmount;
                  System.out.println(totalQuantitySum+"  "+totalAmountSum);
              }
              if(totalQuantitySum.equals(materialAcceptingRejectSheetBean.totalQty) &amp;&amp; totalAmountSum.equals(materialAcceptingRejectSheetBean.totalAmount)){
                  balanced= true;
              }
          }
  
          System.out.println(balanced);
          return balanced;
  
      }
  </code></pre>
  
  <p>Why this function always return false???</p>