initial java version of coin change problem