Exprivia Interview Question

Java patterns