+ 1
Scanner in java
What is the input function of java like scanf in c programming?
2 Answers
+ 6
You have to import the Scanner class from the java.util package. You can inspect methods of the Scanner class here:
https://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html
Be aware that you need to create an object of Scanner in your main method so you can get input.
+ 1
thank u