In order for the MyProgram
program to be compiled and run, which of the following must be true?
MyProgram
class must be defined in MyProgram.java
. MyProgram
must be declared public. MyProgram
must have a correctly formed main()
method. MyProgram
must import java.lang. C.
For a class to be compiled and run, it must have a correctly formed main()
method.
It does not need to be declared public.