I found some error in this but I can't understand what? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответов
+ 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