What is wrong in this java code using scanner? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is wrong in this java code using scanner?

https://code.sololearn.com/ct1IZ6QounNG/?ref=app

3rd Jun 2020, 7:48 AM
Harsh Vyas
Harsh Vyas - avatar
5 Answers
0
You are welcome bro. Keep learning. Keep coding.
3rd Jun 2020, 9:19 AM
Nafis Sadiq
+ 1
java() is constructed to look for name and age arguments to be passed to it but no arguments are. however you also never us the name and age argument being passed as they are immediately overwritten by user input
3rd Jun 2020, 8:04 AM
JME
+ 1
In your main method, you have called your method without setting parameters which generates an error. try setting the scanner to the main method and pass the values ​​to the method
3rd Jun 2020, 8:05 AM
Lucas Reina
Lucas Reina - avatar
3rd Jun 2020, 8:27 AM
Nafis Sadiq
+ 1
Thnkuu nafis bro
3rd Jun 2020, 9:17 AM
Harsh Vyas
Harsh Vyas - avatar