Also look at the Scanner class. It has methods to read and convert data.