What did I do wrong? | Sololearn: Learn to code for FREE!


What did I do wrong?


12/2/2021 5:20:02 PM


5 Answers

New Answer


* 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


Max You have to be focused. You did many basic mistakes.


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


Lisa i did the classes and objects course but it seems like i did not check it... 🤦


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