maxPoints in java