+ 7

help me solving this error. Read the Description very very carefully

The program is as follows 1. It should ask user for a input a word. 2.it should display the length of the word. https://code.sololearn.com/cCz7czm7exmv/?ref=app

4th Jun 2019, 8:17 AM
Swaraj Singh
Swaraj Singh - avatar
2 Respuestas
+ 4
Problem 1: You didn't import Scanner Problem 2: You didn't make the main method correctly, you left out the arguments, therefore that doesn't execute Problem 3: You defined the length of n before it was defined Problem 4: You can't get the length of integers, only strings or arrays Problem 5: You didn't make the scanner correctly (Like this: Scanner s1 = new Scanner(System.in);) Problem 6: next.Int(System.in) is not a function -> s1.nextInt(), but to get the next word, use s1.next() Problem 7: You wrote "Syatem" instead of System https://code.sololearn.com/chvX12i65A4T/?ref=app
4th Jun 2019, 8:41 AM
Airree
Airree - avatar
+ 4
Thank you
4th Jun 2019, 8:46 AM
Swaraj Singh
Swaraj Singh - avatar