1import java.util.Scanner;
2
3// import scanner
4
5Scanner myScanner = new Scanner(System.in); // Make scanner obj
6
7String inputString = myScanner.nextLine(); // Take whole line
8
9boolean inputBoolean = myScanner.nextBoolean(); //Boolean input
10
11long inputLong = myScanner.nextLong(); //Interger,long ... input
1import java.util.Scanner;
2
3Public class Scanner {
4 Public static void main(String[] args) {
5 // Scanner *scanner name here* = new Scanner(System.in);
6 Scanner scan = new Scanner(System.in);
7 System.out.println("Type anything and the scanner will take that input and print it");
8 String next = scan.next();
9 System.out.println(next);
10 }
11}