Read the API doc for Scanner class for the methods it has for reading different types of data.