+ 2
How to create multiple scanner objects in java?
Related to java
4 Answers
+ 3
You can create only one scanner object and use it any where else in this class.
+ 1
Why you need multiple Scanner?
You can do with only one..
+ 1
Thank you for telling me.
0
The same way you create any object in Java.
Scanner scan1 = new Scanner(System.in);
Scanner scan2 = new Scanner(System.in);
File data = new File("data.txt);
Scanner fileRead = new Scanner(data);
And so on but I'm not sure why you'd need multiple Scanners