Java does not have a goto statement for the reason that it offers a way to department in an arbitrary and unstructured manner. This usually would make goto-ridden code tricky to grasp and hard to take care of. What's more, it prohibits certain compiler optimization. This function is poll() and has 2 variants talked about in this post. one. pollFir