Here is the code after we started it together:

import java.util.Scanner;

public class Questioner {

    Scanner input;
    
    Questioner() {
        input = new Scanner(System.in);
    }
    
    void ask() {
        System.out.println("Type 1 to pick a sport or 2 to pick a number of players");
        int num = input.nextInt();
        if(num == 1) {
            System.out.println("Choose a sport (basketball, curling, or baseball)");
            String str = input.next();
            if(str.equals("basketball")) {
                System.out.println("How many players in basketball?");
                int num2 = input.nextInt();
                if(num2 == 5) {
                    System.out.println("Correct!!!");
                } else {
                    System.out.println("Wrong; it should be 5");
                }
            }
            
        }
    }
}