No, we cannot declare the main method of a class as private in Java. The main method must be declared as public static in order to run any application correctly. If the main method is declared as private, the code will not get executed and will give a runtime error. Therefore, the correct answer is option d) Both statements are false.
Para escrever sua resposta aqui, entre ou crie uma conta
Compartilhar