0
Can someone explain me this Scanner myVar = new Scanner(System.in);
2 Respostas
+ 5
To get input from user you need to create an object of Scanner class.
By using that object you can input integer, floats,double,string etc from user.
Example:
Scanner sc=new Scanner (System.in);
//Object
sc.nextInt(); //get integer input from user
etc
0
Thanks a lot😊😊😊