+ 3
What did I do wrong?
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
+ 7
Max
You have to be focused. You did many basic mistakes.
+ 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
+ 1
Lisa i did the classes and objects course but it seems like i did not check it... 🤦
+ 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