Answers for "scanner console input java"

10

how to use scanners in java

import java.util.Scanner;

Public class Scanner {
	Public static void main(String[] args) {
    	// Scanner *scanner name here* = new Scanner(System.in);
      	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);
    } 
}
Posted by: Guest on August-18-2020
0

java how to write something on the console with scanner

Scanner scanner = new Scanner(System.in);
Posted by: Guest on February-08-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language