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);








网友评论