I found some error in this but I can't understand what? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I found some error in this but I can't understand what?

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

20th Aug 2022, 2:14 AM
Avinash Dhaka
Avinash Dhaka - avatar
2 Answers
+ 1
Avinash Dhaka I have not seen this syntax with method in Java. [ ] Where did you get this?
20th Aug 2022, 5:37 AM
A͢J
A͢J - avatar
0
It's a trivial typo error; just replace square braces with curly braces in lines 6 and 12 and the code will work fine.
20th Aug 2022, 2:30 AM
Fabio Caputi