asks the user for an angle in degrees between 0 and 180-Collection of common programming errors
Put the question in a loop. When the user enters a value that is outside your range, print an error message and request a different value. When the entered value is OK, then you can exit the loop. It is better to use a function to make things more readable:
public static int askForInt(String question, String error, int min, int max) {
while (true) {
System.out.print(question + " (an integer between " + min + " and " + max + "): ");
int read = new Scanner(System.in).nextInt();
if (read >= min && read