how to get input from user in ja
2021-07-07 本文已影响0人
陆盼一一
How to get input from user in Java
link:
https://www.javatpoint.com/how-to-get-input-from-user-in-java
1. java scanner clan
java scanner class allows the user to take input from the console. It belongs to java.util package. it is used to read the input of primitive types like int, double, long, short, float, ad byte. it is the easiest way to read inout in java program .
syntax
Scanner sc=new Scanner(System.in);