Grokking Java Basics
0% completed
Java Basics of Input
In Java, user input is commonly handled using the Scanner class. This class, part of the java.util package, provides methods to read various types of data such as integers, floating-point numbers, strings, and booleans from the user.
What is the Scanner Class?
The Scanner class allows programs to read input from a variety of sources, including the keyboard. It is part of Java's standard library, so you only need to import it at the beginning of your program:
import java.util.Scanner;
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%