How to Get Input in Java?

Use `Scanner` with `System.in`

Use `BufferedReader` with `InputStreamReader`

Use `Console` with `System.console()`

Use `System.in.read()`

Use `DataInputStream`

Use `JOptionPane.showInputDialog()`

Use command-line arguments with `main(String[] args)`

Suggested for You

Trending Today