Java code for prime factors kata done as part of Craft Course