New course! Every coder should learn Generative AI!
Try a free lesson0
Why the (System.in) while we are creating an object for Scanner class in Java?
1 Answer
+ 1
System.in is used for giving input from the system or the user. Whereas Scanner class is the one which accepts the input.