To compile the public class MyClass successfully, which of the following are true?
main()
method. B.
A class does not need a main()
method to compile.
Nor does it need to be defined in a package or imported.
However, a public class needs to be defined in a source code file of the same name.