Java tutorial
//package com.java2s; public class Main { /** Basic Arithmetic operators to be called to evaluate values for computed fields */ public static Double prod(Double d1, Double d2) { if (d1 == null || d2 == null) return Double.valueOf("0"); return d1 * d2; } public static Double prod(Object o1, Object o2) { if (o1 == null || o2 == null) return Double.valueOf("0"); return Double.valueOf(o1.toString()) * Double.valueOf(o2.toString()); } }