added some java solutions