I used scanner class while compiling the program it is saying to give custom input. What does it mean? May anyone please help me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I used scanner class while compiling the program it is saying to give custom input. What does it mean? May anyone please help me

Need help with scanner class

12th Aug 2017, 6:55 AM
Pranshu Jaiswal
Pranshu Jaiswal - avatar
6 Answers
+ 10
Just press the run button.
12th Aug 2017, 7:10 AM
Hatsy Rei
Hatsy Rei - avatar
+ 8
Unlike desktop compilers, Code Playground requires you to feed input to your program prior to code compilation. Split multiple inputs into different lines.
12th Aug 2017, 6:59 AM
Hatsy Rei
Hatsy Rei - avatar
+ 5
You enter whatever your program requires to run. If your program wants integers, input numbers. If your program wants a string, input string.
12th Aug 2017, 7:26 AM
Hatsy Rei
Hatsy Rei - avatar
0
what do I enter in the custom input?
12th Aug 2017, 7:14 AM
Pranshu Jaiswal
Pranshu Jaiswal - avatar
0
scanner does what a string or an int would do but instead you enter the value manually. example Scanner sc = new Scanner(System.in); <creates a scanner object. String x = sc.nextline(); << here to initialize x it uses scanner value "the number or word you enterd after you press run". System.out.println(x); <here outputs what ever you inputted into scanner.
12th Aug 2017, 7:54 AM
D_Stark
D_Stark - avatar
- 1
Then how do I compile my code?
12th Aug 2017, 7:00 AM
Pranshu Jaiswal
Pranshu Jaiswal - avatar