You are probably using a special UserInput package given by your teacher or something like that at university. If so, then you just need to "install" this package on your Mac or use the java.util.Scanner class to work with user input.
source
to share