Cannot Return a Value From Method Whose Result Type Is Void


This Java error occurs when a void method tries to return any value, such as in the following example:
public static void move()
{
    System.out.println("What do you want to do?");
    Scanner scan = new Scanner(System.in);
    int userMove = scan.nextInt();
    return userMove;
}
public static void usersMove(String playerName, int gesture)
{
    int userMove = move();
    if (userMove == -1)
    {
        break;
    }

Often this is fixed by changing to method signature to match the type in the return statement. In this case, instances of void can be changed to int:
public static int move()
{
    System.out.println("What do you want to do?");
    Scanner scan = new Scanner(System.in);
    int userMove = scan.nextInt();
    return userMove;
}