add java solution for nmodm