Making sure user inputs correct type I have two functions that are used to prompt and recieve input from the user. One is for int and the other is for boolean. They work somewhat similar to each other, one uses try/catch and the other doesn't. Can they be improved upon or is one better than the other? I'm having trouble with the user interface, I'm not sure what should happen when the user gives an invalid input. I asked on userexperience and didn't get much feed back.

/*returns integer to question asked in prompt*/
public static int getNumber(String prompt)
{
    Scanner sc = new Scanner(System.in);
    while (true) {
        System.out.print("\t"+prompt+": ");
        String input = sc.next();
        try {
            return Integer.parseInt(input);
        } catch (NumberFormatException ne) {
            System.out.println("\tPlease enter an integer.");
        }
    }
}

/*returns boolean to question asked in message*/
public static boolean getBool(String message)
{
    Scanner sc = new Scanner(System.in);
    String answer;

    System.out.print("\t"+message+": ");
    while (true) {
      answer = sc.nextLine().trim().toLowerCase();
      if (answer.equals("y")) {
        return true;
      } else if (answer.equals("n")) {
        return false;
      } else {
         System.out.print("\tPlease answer y/n");
      }
    }

}


One problem is "please enter an integer". If the user is non-technical they may not know what an integer is, but I can't think of better wording.

Here is another version of the methods

/*returns integer to question asked in prompt*/
public static int getNumber(String prompt)
{
    Scanner sc = new Scanner(System.in);
    while (true) {
        System.out.print("\t"+prompt+": ");
        String input = sc.next();
        try {
            return Integer.parseInt(input);
        } catch (NumberFormatException ne) {
            System.out.println("\tPlease enter an integer.");
        }
    }
}

/*returns boolean to question asked in message*/
public static boolean getBool(String message)
{
    Scanner sc = new Scanner(System.in);
    String answer;


    do{
      System.out.print("\t"+message+" (y/n): ");
      answer = sc.nextLine().trim().toLowerCase();
      if (answer.equals("y")) {
        return true;
      } else if (answer.equals("n")) {
        return false;
      }
    }while(true);

}


An example of these functions being used is when they are called with

public static void main(String[] args)
{

    System.out.println("Please reply with y or n"); 
    boolean celsius = getBool("Temperature in celsius"); 
    boolean wind = getBool("Regularly windy"); 
    System.out.println("Please enter an integer");
    int minTemp = getNumber("Minimum temperature during day"); 
    int maxTemp = getNumber("Maximum temperature during the day"); 
    int minTempNight = getNumber("Minimum temperature during the night"); 
    int maxTempNight = getNumber("Maximum temperature during the night");
    //setup();
}


Example input/output

run:
Please reply with y or n
    Temperature in celsius (y/n): m
    Temperature in celsius (y/n): 5
    Temperature in celsius (y/n): y
    Regularly windy (y/n): asdf
    Regularly windy (y/n): y
Please enter an integer
    Minimum temperature during day: 5
    Maximum temperature during the day: 20
    Minimum temperature during the night: blah
    Please enter an integer.
    Minimum temperature during the night: 1
    Maximum temperature during the night: words
    Please enter an integer.
    Maximum temperature during the night: 10
If the user is non-technical they may not know what an integer is, but
  I can't think of better wording.


[Positive] Number or [Positive] Whole Number would be alternatives. 

Another possibility: Enter a Number between 0 and [X]. Non-technical people will assume that this means they should enter a whole number. If they enter a different number, give feedback accordingly.

Consistency

In your first version: getNumber outputs the prompt each time, while getBool does not. This should be consistent. The names of the input variable should be consistent as well (either prompt or message. I would prefer prompt.

Other

You can do sc.nextInt(); instead of String input = sc.next(); Integer.parseInt(input);.

As already mentioned on UX, show the possible values for the boolean answer in the prompt when asking the question. So 

boolean wind = getBool("Regularly windy"); 


becomes

boolean wind = getBool("Regularly windy (y/n)"); 


Extract Method

You can extract the method to retrieve a string. I think that this makes the code a bit more readable, and you get getString method for free.

/*returns integer to question asked in prompt*/
public static int getNumber(String prompt) {
    while (true) {
        String input = getString(prompt);
        try {
            return Integer.parseInt(input);
        } catch (NumberFormatException ne) {
            System.out.println("\tPlease enter a positive whole number.");
        }
    }
}

/*returns boolean to question asked in prompt*/
public static boolean getBool(String prompt) {
    while (true) {            
        String input = getString(prompt).trim().toLowerCase();
        if (input.equals("y")) {
            return true;
        } else if (input.equals("n")) {
            return false;
        } else {
            System.out.print("\tPlease answer y/n");
        }
    }
}

/*returns string to question asked in prompt*/
public static String getString(String prompt) {
    System.out.print("\t" + prompt + ": ");
    Scanner sc = new Scanner(System.in);
    return sc.nextLine();
}