System resolution using Kramer method [Java]