2nd Dec 2021, 5:20 PM
Max
Max - avatar
5 Respuestas
+ 14
* classes do not have a turn type * make the class static if you want to use the method without instatiating a Converter * classes do not have parameters – they have constructors * current toBinary() does not take any argument * toBinary() does not return anything – therefore nothing to print Classes will be explained in the sololearn Java course
2nd Dec 2021, 5:43 PM
Lisa
Lisa - avatar
+ 7
Max You have to be focused. You did many basic mistakes.
2nd Dec 2021, 7:55 PM
A͢J
A͢J - avatar
+ 4
class delete static void, before class main() add public there move main() inside class toBinary() add } after method change void to some other type add return command
2nd Dec 2021, 8:50 PM
zemiak
+ 1
Lisa i did the classes and objects course but it seems like i did not check it... 🤦
2nd Dec 2021, 7:42 PM
Max
Max - avatar
+ 1
A class can be declared static only if it is a nested class. It does not require any reference of the outer class. The property of the static class is that it does not allows us to access the non-static members of the outer class. Source: Javatpoint
3rd Dec 2021, 4:22 AM
Mohd Aadil
Mohd Aadil - avatar