Create maxOccurrences.java