Java tutorial
//package com.java2s; import java.math.BigDecimal; public class Main { public static boolean equalTo(BigDecimal b1, BigDecimal b2) { if (b1 == null || b2 == null) { return false; } return 0 == b1.compareTo(b2); } }