May i know where i am wrong | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
14th Oct 2022, 1:04 AM
Eli
Eli - avatar
8 Answers
+ 2
saveCustomerInfo() definition doesn't match the invocation. The definition specifies method with parameters, invocation calls it as if the method accepts no parameters.
14th Oct 2022, 2:19 AM
Ipang
+ 2
Look at definition at line 29, you have specified that the method accept parameters. Next look at line 18, the invocation doesn't pass any argument
14th Oct 2022, 2:26 AM
Ipang
+ 2
Call the method giving it arguments as specified in its definition. Line 18: customer.saveCustomerInfo( firstName, secondName, age, roomNumber );
14th Oct 2022, 2:33 AM
Ipang
+ 2
Must've missed it somewhere, I got no error with that ...
14th Oct 2022, 2:42 AM
Ipang
+ 1
Yep it worked i wrote it this way initially (String firstName..) THANK YOU
14th Oct 2022, 3:02 AM
Eli
Eli - avatar
0
Okay so what should I do then
14th Oct 2022, 2:28 AM
Eli
Eli - avatar
0
Still didn't work i got an ')' needed
14th Oct 2022, 2:41 AM
Eli
Eli - avatar
- 1
How does itvnot match the invocation
14th Oct 2022, 2:22 AM
Eli
Eli - avatar