added four simple java examples