The term you are looking for is "Continuous Collision Detection" (CCD), something also refered to as "Anti-Tunneling" and less commonly "Broad-phase collision detection".
Some CCD implementations rely on ray-casting approaches that cast a ray in the direction of the fast traveling object to check if there is an object in the way and try to estimate whether the next frame update could already bypass this "hit" object (based on current speed). If so the expected time of impact is calculated and the movement restricted accordingly.
Another approach often used by the physics engines (e.g. "PhysX" or "Bullet") is to not only check for collisions at the position the object currently is in (which might already be beyond the object it should have collided with), but to also do various checks between the position from the previous frame and the current one. Bullet does so by using a "swept sphere" which is used to quickly check for potential collisions along that path (a sphere is used since it is even faster to check than a box).
It is advised to only turn on CCD for fast objects since it rather performance-heavy. Therefore, in some engines you have to defined speed threshold and only once they are hit, CCD comes into play (e.g. see this Bullet setup guide).
PS: I know that the mentioned physics engines are C++ and you are asking for Java, but the principles still apply.
BTW: Also have a look at this answer, as well as this more generic / theoretical SO question on potential algorithms.