The Scanner class can be used for many things other then just getting input from the user; however this cheat sheet/tutorial is just going to be about getting input from the user. Defining the Scanner Class Java Code: import java.util.Scanner; public class ClassName{ ...code... } It will tell the translator to look in that directory for the code defining the Scanner class. Declaring the Scanner If you ...
import java.util.Scanner; public class ClassName{ ...code... }
Updated 10-18-2012 at 01:29 AM by penguinCoder