how to play loop every .2 seconds

I am kinda new to java still. and I am making a FPS and i want the gun to shoot every say .2 seconds but i do not want to use function upate so how would i do that? with some type of loop?

Here’s a way to call a function repeatedly over time: InvokeRepeating