Search:

Type: Posts; User: javapenguin

Search: Search took 0.15 seconds.

  1. Replies
    5
    Views
    4,321

    Re: Allowing user to input variable.

    get rid of the set of brackets that start after meal5 = scan.nextInt() and that end after mealtoeat = scan.nextInt(), those aren't needed and will cause errors.
    try adding

    String foodA = " ";...
  2. Replies
    5
    Views
    4,321

    Re: Allowing user to input variable.

    Scanner console = new Scanner(System.in);
    int numOfArrows = 0;
    int numberOfArrowsToUse = 0;
    System.out.println("Hello! Input the number of Arrows you want!");
    numOfArrows = console.nextInt();
    ...
Results 1 to 2 of 2