Java tutorial
//package com.java2s; public class Main { public static boolean equal(Object a, Object b) { return a == b || (a != null && a.equals(b)); } }