This Java program can be used to solve a system of linear congruence equations of the form x = b (mod n). It is based on the Chinese Reminder Theorem (see e.g. https://en.wikipedia.org/wiki/Chinese_remainder_theorem#Theorem_statement) and therefore it is required that all the moduli are pairwise coprime.
While teaching a course in basic number theory at the University of Jyväskylä in Spring 2020, I was self-studying Java programming and decided to apply Java to some basic concepts from the course.