import java.util.Scanner;public class Question91{public static void main(String args[]){Scanner sc = new Scanner(System.in);String input = sc.nextLine(); // Read as string, e.g., 5+6 code example
Example: how to use scanners in java
import java.util.Scanner;
Public class Scanner {
Public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Type anything and the scanner will take that input and print it");
String next = scan.next();
System.out.println(next);
}
}