+ 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
6 odpowiedzi
+ 10
Just press the run button.
+ 8
Unlike desktop compilers, Code Playground requires you to feed input to your program prior to code compilation. Split multiple inputs into different lines.
+ 5
You enter whatever your program requires to run. If your program wants integers, input numbers. If your program wants a string, input string.
0
what do I enter in the custom input?
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.
- 1
Then how do I compile my code?