input
4 tutorials tagged “input”.
- Command Line ArgumentsPass values to a program when you start it: how the command line becomes args, quoting values with spaces, converting and checking them.
- Simple Console I/O with the IO ClassJava 25's java.lang.IO class: println, print and readln for quick console programs without System.out or Scanner, what readln returns, and when to use it.
- Scanner ClassRead keyboard input with Scanner: next, nextInt and nextLine, how input is split into tokens, the nextInt-then-nextLine trap, and bad input.
- Scanner vs BufferedReaderTwo ways to read console input: Scanner, which converts types for you, and BufferedReader, which reads whole lines fast. When to choose which.