I am making a game for my com sci class and it uses console to display user inputs. I want to use the Java Scanner class to receive a text of line from the user however when I try to use the scanner inputs, it doesn't work.
This is the import I use:
import java.util.Scanner;
this is essentially what I'm trying to do
Scanner keyboard = new Scanner(System.in); // not system.in but something compatible to console
maybe scanner isn't compatible with console and perhaps I need to use another class? Or maybe i'm doing something wrong? Thanks :)