Check out this:
Java Tips - How to read input from console

Otherwise, if you wanted something bigger/permanently store values and go beyond the basics, then I suggest reading a Java programming...