add java solution