In javelin throw, athletes normally get:
Qualifying rounds: up to 3 attempts.
Final: each athlete gets 3 attempts, and the top 8 athletes after those three get 3 additional attempts.
So a finalist can have up to 6 throws in total.
Therefore, in a standard competition, the maximum is 6...