Java does not have a goto statement because it provides a means to department in an arbitrary and unstructured fashion. This normally would make goto-ridden code challenging to know and tricky to take care of. Additionally, it prohibits particular compiler optimization. For utilizing this class to produce random figures, we must initially make an