How do I read formatted input from the command line?

John Zukowski

The java.util.Scanner constructor takes a file, channel, input stream, or reader as an argument and lets you read an int (with nextInt()), read a line (with nextLine()), or any other data type with an aptly named next*() method.

About | Sitemap | Contact